node-siri
is a light-weight Siri Proxy written in Node.JS that does
not require you to jailbreak your device.
npm install siri
git clone https://github.com/zhangyuanwei/node-siri.git
npm update
The installation script requires ports 80 and 443 to be open, and should run under a privileged account which can open those ports.
You need a way to hijack DNS requests for guzzoni.apple.com
and send
them to your server running node-siri
. You only need to perform one
of the following DNS procedures.
dnsmasq is a light- weight, easy to configure DNS forwarder and DHCP server. It is designed to provide DNS and, optionally, DHCP, to a small network.
Where your.ip.add.ress
is the IP address of the server running
node-siri
, do the following:
- Install dnsmasq
- Edit
/etc/dnsmasq.conf
in your favorite editor - Add the line:
address=/guzzoni.apple.com/your.ip.add.ress
- Start the dnsmasq daemon
- Under Settings on your iDevice, edit your DNS Server to be
your
dnsmasq
server.
If you already have a DNS server on your network, simply create a zone
file for guzzoni.apple.com
to point to your node-siri
server.
See the contrib/
directory for a sample zone file.
- Run
sudo node install.js
- Browse to http://guzzoni.apple.com from your iDevice.
- Install the certificate from the link provided on the webpage.
- Reload the webpage.
- If everything is green, end the
install.js
process. - Copy
config.json.sample
toconfig.json
and edit appropriately. - Run
sudo node examples/en-US/hello.js
- Activate Siri and say "Hello".
Siri should respond with "Siri Proxy says 'Hello!'"
Configuration can come either from the command line or your
config.json
file.
While it is recommended to keep your configuration in the file, you may wish you temporarily change some settings while testing. To do so, add the argument(s) on the command line.
sudo node examples/hello.js --debug 1 --locale zh
var siri = require("siri");
siri.createServer(function(cmd, dev) {
if (/Hello/.test(cmd)) {
dev.end("Siri Proxy says 'Hello!'");
} else {
dev.proxy();
}
}).start();
A Siri conversation consists of one or more requests from the client and n or more responses from the Siri server.
A Siri Proxy conversation may call .say()
or .ask()
zero or more
times during the transaction, however, it must finish with an .end()
.
Returns information to Siri. This can be called multiple times during the conversation.
Returns information to Siri and waits for an answer. This can be called multiple times during the conversation.
The answer is sent to the callback function of your choosing.
Answers the callback function.
This dialog ends, and optionally returns any information. This MUST be called to finalize the transaction.
The conversation is handed over to the Siri server for processing.
- You should be running all the commands from the main
node-siri
directory. - Ensure your iDevice resolves
guzzoni.apple.com
as yournode-siri
server. DEPTH_ZERO_SELF_SIGNED_CERT
: Ensure yournode-siri
server is resolvingguzzoni.apple.com
to the internet. It should not be pointing to itself!EACCES
: Startnode
in privledged mode, e.g. (sudo node
)
Submit an issue on github with a pastebin (or equivilant) of the output of the following commands:
pwd
ls -la
cat config.json
cat examples/proxy.js
openssl x509 -in keys/server-cert.pem -noout -text
nslookup guzzoni.apple.com
node -v
sudo node examples/proxy.js --debug 1