SiriProxy icon indicating copy to clipboard operation
SiriProxy copied to clipboard

Connection closes immediately

Open birkholz opened this issue 14 years ago • 103 comments

I have everything working exactly as it should, but when I open Siri it immediately closes with the network error. SiriProxy is getting traffic, but the connection won't stay open. My DNS settings are all correct according to the many other issue resposes. This is what Terminal tells me: http://pastebin.com/raw.php?i=nYapxa5G

birkholz avatar Dec 27 '11 10:12 birkholz

Weird, same thing here. I believe it is all setup right. Anyone have any ideas?

grp avatar Dec 27 '11 10:12 grp

Looks like it's not getting past the SSL handshake. Are you sure the certificates are correct & installed?

westbaer avatar Dec 27 '11 12:12 westbaer

Nope, not at all.

Sent from my MacBook Air

On Tuesday, December 27, 2011 at 4:26 AM, Nicolas Haunold wrote:

Looks like it's not getting past the SSL handshake. Are you sure the certificates are correct & installed?


Reply to this email directly or view it on GitHub: https://github.com/plamoni/SiriProxy/issues/210#issuecomment-3281036

grp avatar Dec 27 '11 12:12 grp

I used Gencerts and emailed ca.pem to my phone and installed it. Is there supposed to be something more done? If the IP address of the server changes, do I need to make a new certificate?

birkholz avatar Dec 27 '11 20:12 birkholz

Ah, I needed to fix the domain in the SSL cert. That makes sense.

grp avatar Dec 27 '11 20:12 grp

Could you explain how you did that? Is it working now, and are you using Spire?

birkholz avatar Dec 27 '11 21:12 birkholz

For a temporary fix, you can fix this issue by

  1. Delete everything except config.yml from ~/.sirirproxy
  2. Open up (directory you git cloned siriproxy into)/scripts/gen_certs.sh and modify it like this:

line 58: echo "guzzoni.apple.com" >> $TMP_DIR/ca.args

Change "guizzoni.apple.com" to your IP address you'll be listening on for you iPhone. For me, this line became

echo "192.168.2.10" >> $TMP_DIR/ca.args

  1. Rerun siriproxy gencerts as in README
  2. Copy over the .pem files to your iphone

This has to be done everytime your IP address changes, as it is hardcoded into the server's SSL cert. A better way would be split gen_certs into half, and sign a new cert every time siriproxy server is started.

terriblybored avatar Dec 28 '11 06:12 terriblybored

Yeah. That's the fix. If you are doing this on a server, though, you can do a domain which won't change often.

Sent from my MacBook Air

On Tuesday, December 27, 2011 at 10:21 PM, terriblybored wrote:

For a temporary fix, you can fix this issue by

  1. Delete everything except config.yml from ~/.sirirproxy
  2. Open up (directory you git cloned siriproxy into)/scripts/gen_certs.sh (http://gen_certs.sh) and modify it like this:

line 58: echo "guzzoni.apple.com (http://guzzoni.apple.com)" >> $TMP_DIR/ca.args

Change "guizzoni.apple.com (http://guizzoni.apple.com)" to your IP address you'll be listening on for you iPhone. For me, this line became

echo "192.168.2.10" >> $TMP_DIR/ca.args

  1. Rerun siriproxy gencerts as in README
  2. Copy over the .pem files to your iphone

This has to be done everytime your IP address changes, as it is hardcoded into the server's SSL cert. A better way would be split gen_certs into half, and sign a new cert every time siriproxy server is started.


Reply to this email directly or view it on GitHub: https://github.com/plamoni/SiriProxy/issues/210#issuecomment-3288508

grp avatar Dec 28 '11 06:12 grp

Oh. To clarify what I've said, this is the IP address you insert inside your iPhone's Settings/Spire/Proxy Host field. If you don't use Spire, and is instead meddling with the DNS, then theres no need for this fix, and the problem is somewhere else.

terriblybored avatar Dec 28 '11 06:12 terriblybored

I attempted your fix, but it's still acting the same. After deleting all the files, I tried changing the string to both "192.168.1.6", the IP of the server, and "192.168.1.6:443", server IP with port, like necessary for Spire. I use "siriproxy gencerts" then copy ca.pem to my phone and replace the old certificate, but it still acts the same. I noticed though that after changing the province/state in gencerts.sh and running it and placing it on my phone, it didn't show the updated string for province/state for the certificate on my phone.

birkholz avatar Dec 28 '11 06:12 birkholz

same for me.

output looks like this when i connect with my iphone:


Starting SiriProxy on port 443.. Create server for iPhone connection start conn #<SiriProxy::Connection::Iphone:0x00000011b1cd38 @signature=3, @processed_headers=false, @output_buffer="", @input_buffer="", @unzipped_input="", @unzipped_output="", @unzip_stream=#Zlib::Inflate:0x00000011b1cba8, @zip_stream=#Zlib::Deflate:0x00000011b25e38, @consumed_ace=false, @name="iPhone", @ssled=false> [Info - Plugin Manager] Plugins laoded: [#<SiriProxy::Plugin::Example:0x00000011ab6f60 @manager=#<SiriProxy::PluginManager:0x00000011b02d48 @plugins=[...]>>] Create server for iPhone connection start conn #<SiriProxy::Connection::Iphone:0x00000011ab6ce0 @signature=4, @processed_headers=false, @output_buffer="", @input_buffer="", @unzipped_input="", @unzipped_output="", @unzip_stream=#Zlib::Inflate:0x00000011ab6ad8, @zip_stream=#Zlib::Deflate:0x00000011ab6a88, @consumed_ace=false, @name="iPhone", @ssled=false> [Info - Plugin Manager] Plugins laoded: [#<SiriProxy::Plugin::Example:0x00000011ab5f48 @manager=#<SiriProxy::PluginManager:0x00000011ab65d8 @plugins=[...]>>] Create server for iPhone connection start conn #<SiriProxy::Connection::Iphone:0x00000011ab5e08 @signature=5, @processed_headers=false, @output_buffer="", @input_buffer="", @unzipped_input="", @unzipped_output="", @unzip_stream=#Zlib::Inflate:0x00000011ab5c78, @zip_stream=#Zlib::Deflate:0x00000011ab5c50, @consumed_ace=false, @name="iPhone", @ssled=false>

[Info - Plugin Manager] Plugins laoded: [#<SiriProxy::Plugin::Example:0x00000011ab5110 @manager=#<SiriProxy::PluginManager:0x00000011ab5700 @plugins=[...]>>]

i also deleted everything (except the config) from .siriproxy and changed "guzzoni.apple.com" to the static public IP of my Server. Then i deleted all Certs on my phone, generated a new on and installed it on the phone. Siri still tells me that there is a problem and that she cant help me.

ghost avatar Dec 28 '11 06:12 ghost

since we should be using VPN or in the same subnet, does it make sense to assume that the ip would not be changed?

mcdull avatar Dec 28 '11 06:12 mcdull

That's strange. Can you open up server.passless.crt and verify that line 11 is as follows: Subject: C=US, ST=Missouri, O=Siri Proxy, CN=192.168.2.10

Where CN is your new server ip?

terriblybored avatar Dec 28 '11 08:12 terriblybored

for me:

Subject: C=US, ST=Missouri, O=Siri Proxy, CN=guzzoni.apple.com

changing the script seems not to work for me

ghost avatar Dec 28 '11 08:12 ghost

Your IP might change if you're using DHCP and your lease expires. If you're using a static IP, it shouldn't change (unless you change it). It really depends on how you have configured your VPN server. If your server IP changes though, you'll definitely notice.

terriblybored avatar Dec 28 '11 08:12 terriblybored

I have tried the workaround and the result is the same. start conn #<SrirProxy::Connection::Inphone:0x9e80f2c @signature=16, @processed_headers=false, @output_buffer="", @input_butter="", @unzipped_input="", @unzipped_output="", @unzip_stream=#Zlib::Inflate:0x9e80bd0, @zip_stream=#Zlib::Deflate:0x9e80b30, @consumed_ace_false, @name="iPhone", @ssled=false> [Info - Plugin Manger] Plugin ..........

Please note that this is not copy and plaste. I type it myself so please dont be surprise if there are any typo in it. I did regenerate the cert and load it in to my ipod touch 4G.. seems no difference.

mcdull avatar Dec 28 '11 08:12 mcdull

Since my trial of using Iphone 4S to connect to siriproxy is success (although the siri still dont want to answer). At least the SSL is established and I can see the ZIP stream throwing in the siriproxy. So I doubt the workaround is meaningful.

mcdull avatar Dec 28 '11 08:12 mcdull

Submitted a pull request for the fix I am using. I myself can't get siriproxy to work properly (as I don't actually have an iPhone 4S), but before this fix, I could not get the proxy to work. Now, it at least communicates with Apple servers.

terriblybored avatar Dec 28 '11 08:12 terriblybored

Not very sure why my earlier fix isn't updating the CN though. Theoretically, that alone should be sufficient. The pull request I have submitted modifies gencert to allow an ip address/domain as an additional argument. If you want, you can try pulling the copy I'm using and gencerting something out again.

terriblybored avatar Dec 28 '11 08:12 terriblybored

found why (for me). the script that was used was not the one in my git export. It was the one under this location:

/usr/local/rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/scripts/gen_certs.sh

now the CN is correct

ghost avatar Dec 28 '11 08:12 ghost