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 TCP/443 and optionally TCP/80 (for the setup, this port can be changed) to be open and should run under a privileged account which can open those ports.
Normal operation requires port TCP/443 to be open and optionally UDP/53 (if using dnsproxy) to be open, and should run under a privileged account which can open those ports.
Configuration can come either from the command line or your
config.json
file.
- Copy
config.json.sample
toconfig.json
. - Use a text editor to edit your defaults.
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/proxy.js --debug 1 --locale zh
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.
node-siri
includes a dns proxy server to simplify things.
- Set
dnsproxy
totrue
(or1
) inconfig.json
. - Configure your iDevice to use the
node-siri
server's IP address for the first DNS 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 (in Safari!)
- Install the certificate from the link provided on the webpage.
- Reload the webpage.
- If everything is green, end the
install.js
process. - Run
sudo node examples/en-US/hello.js
- Activate Siri and say "Hello".
Siri should respond with "Siri Proxy says 'Hello!'"
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.
- 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
)
Logging of extraneous output has been moved to the
debug module. To have
node-siri
output non-critical messages, run your app with the DEBUG
environment variable set like so:
$ DEBUG=siri:* node app.js
node-siri
exposes three log-levels:
siri:debug
siri:warn
siri:error
If you only want to get errors and warnings reported, start your node server like so:
$ sudo DEBUG=siri:warn,siri:error node app.js
Submit an issue on github with a pastebin (or equivilant) of the output of the following commands:
You should be running these commands from the main node-siri
directory, where siri.js
is located.
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 DEBUG=siri:* node examples/proxy.js --dumpdata true