Closed Doriginal closed 10 years ago
That means that the proxy rule was downloaded. Did you already start Squid Proxy? Note that you also have to say the keyword (Siri by default)
Did you change the configuration section in the server.py and the squid.conf?
Yes I said "google siri"
squid looks started
root@ubuntu:/usr/local/squid# /usr/local/squid/sbin/squid -NCd9
2014/04/26 04:55:58| aclIpParseIpData: WARNING: Netmask masks away part of the specified IP in '192.168.0.1/25'
2014/04/26 04:55:58| SECURITY NOTICE: auto-converting deprecated "ssl_bump allow
Okay, which language is currently activated on your iPhone?
french. I put google.fr in the config
You have to make a dot in front of the domain. It has to look like .google.fr . Did you already change the hostnames in squid.conf and server.py? Finally try to restart you iPhone.
I have. google.fr but still nothing google that normally appears
Can you post the configuration section of server.py and your modified squid.conf please?
yes, thank for your help.
######################
######################
squid_hostname = "192.168.0.8" # Hostname or IP address of the server which is running squid proxy squid_port = 3128 # Port of squid (change only if you changed it in squid configuration) google_domain = ".google.fr" # Domain of "the" Google which is opened from your language. Consult readme for more information keyword = "Siri" # By default this is siri. You can change this to any other (well recognized) keyword, CASE SENSITIVE!!!
#####################
SQUID:
strip_query_terms off acl allcomputers src 192.168.0.1/25 # Change to your local networks IP range http_access allow allcomputers http_access allow localhost
acl Blocksites dstdomain .google.fr # Change to the domain depending on your language (consult readme) deny_info http://192.168.0.8:3030%R allcomputers # Enter the hostname of the computer running Siri API http_reply_access deny Blocksites allcomputers
acl CONNECT method CONNECT
acl google dstdomain .google.fr # Change to the domain depending on your language (consult readme)
I read the whole output of the Squid Proxy startup progres you posted. The problem might be at the acl allcomputers part. Please calculate the right CIDR Notation for your network configuration here: http://www.subnet-calculator.com/cidr.php and replace 192.168.0.1/25 with it.
After that reboot the computer Squid is running on and start server.py and squid again. Check if the warning "Netmask masks away part of the specified IP in '192.168.0.1/25" still appears.
After that close all apps on your iPhone and reboot it. After that make shure to be connected to the wifi network and try it again.
If this still not work try to set host 192.168.0.8 and port 3128 in your desktop browsers proxy configuration (I recommend Firefox for this) and try to access google.fr. If Squid is running as expected, you should get an certificate error. Don't try to accept this certificate on Firefox, it won't work. But anyway, we could find the problem if we know where the problem is.
in Firefox i have this:
That's strange. What happens, when you diable the Proxy settings again and you access http://192.168.0.8:3030/proxy.pac ? Please post the content of the pac file. You can open it in any text editor after downloading.
I think I have solved the problem with your site CIDR http://www.subnet-calculator.com/cidr.php
now in the console i:
root@ubuntu:~# /usr/local/squid/sbin/squid
2014/04/26 09:23:26| SECURITY NOTICE: auto-converting deprecated "ssl_bump allow
The content of the pac file is:
Content-type: x-ns-proxy-autoconfig HTTP/1.0 200 OK Server: SimpleHTTP/0.6 Python/3.3.1 Date: Sat, 26 Apr 2014 18:13:49 GMT
function FindProxyForURL(url, host) { var keyword = url.toLowerCase().indexOf("siri"); if (dnsDomainIs(host, ".google.fr") && (keyword >= 0) && url.toLowerCase().indexOf("search?q=") >= 0) { return "PROXY 192.168.0.8:3128"; } return "DIRECT"; }
in firefox now i:
So you eliminated the error but now it seems that squid blocks your connection because your IP address doesn't match with the defined IP range. Maybe you find more information in the access.log in /usr/local/squid/var/logs . If not, just change it back to 192.168.0.1/25 . It is not clean but it was definitive better than now. We can care later for it. I will fix the first error you got by Squid. It seems I didn't catch the problem. But this won't solve your problem. (fixed) Where the header information also stored in the .pac file or did you just add them? If they were stored in the pac file this might be the reason for your problems.
I calculated the CIDR because I was mistaken in the Netmask. On iphone google always appears normally but in firefox now I have this
and if i put a command (www.google.fr/search?q=bonjour) i have this
It was an update which ensures that you don't get an empty response. As I told you it won't fix the problem. But the screenshot helped me to believe that there is going something wrong. The headers are shown on the output and aren't handled as headers. So the HTML can't properly displayed. Also the PAC file becomes invalid during to this problem and the redirection to Squid doesn't work. I think it is a problem with Python. Are you able to update to the latest version? I will try to fix it but I'm currently not shure how.
yes I am willing to upgrade python, how can I do?
This depends on how you have installed python. When you installed it with the package management of your system (Which system are you using), it is a bit complicated because you will have to remove it first and then reinstalling with a package of Python or you will have to compile it manually.
If you use a Debian based system you can use the following ppa to install it as package: https://launchpad.net/~fkrull/+archive/deadsnakes. If you have to compile the sources by yourself you can get some information here: http://askubuntu.com/questions/244544/how-do-i-install-python-3-3
I am python 3.3 should I upgrade anyway?
Shutting down server ... root@ubuntu:~/Siri-API# python3 --version Python 3.3.1
I'm not shure but I think there is a bug in your Python version. I'm using Python 3.2 but of course I won't recommend a downgrade. The latest bug fix release for Python 3.3.x is 3.3.5. I would recommend to upgrade at least to 3.3.5. Read next commend please
I also opened a topic at stack overflow to ask if there is a known Python bug or if I have some parts in my code which might be deprecated. You can find it here: http://stackoverflow.com/questions/23321887/python-3-http-server-sends-headers-as-output
I found a possible workaround by reading the documentaion. I found out that with Python 3.3. the function flush_headers() was introduced. I published a workaround in the Issue 2 branch.
You can download it with git clone https://github.com/HcDevel/Siri-API.git -b Issue-#2
After starting the server.py, please try to open www.google.fr/search?q=bonjour on your computer again and post both, the HTML output in your browser and the output from the terminal here.
same problem and I can not upgrade python, I'm still in 3.3.1
but in internet explorer it works
3 screenshot: firefox, ie and terminal
So the fix I added ran. You can see this at Headers flushed. It might be possible that the firefox has stored the site in it's cache. Try to hit Crtl + F5 or to clear it in the history cleanup dialog.
Can you try to access http://192.168.0.8:3030/?q=bonjour and http://192.168.0.8:3030/proxy.pac on your iPhone?
on my iPhone and ipad the code appear like firefox
which system makes you work siri-api? (debian, ubuntu ..) and what version?
I'll try with an older ubuntu and I told you
You don't need the older ubuntu ;) I just found the problem. Please clone again the issue branch with git clone https://github.com/HcDevel/Siri-API.git -b Issue-#2
I sent the status code after the first header. It seems that it has to be send before the first header since Python 3.3. So I fixed it.
Thank you for your patience and sorry for the inconveniences
By the way: I got it running on Ubuntu 12.04 LTS and on a Raspberry Pi with the latest Raspian.
wow you're great :) thank you to you for your patience and for your responsiveness
in Firefox i have :)
I now tested with iphone and siri
it works perfectly now with siri thank you very much for your help. Now we will try to create some nice plugins :)
Hi Robin. I have followed your Installation instructions for RPi and everything looked fine. Now I try Siri on iPad and I get no response. How do I determined whether the connections are working. When I enter http://10.0.0.4:3030/proxy.pac? in Chrome on my Mac I get: function FindProxyForURL(url, host) { var keyword = url.toLowerCase().indexOf("siri"); if (dnsDomainIs(host, ".google.co.za") && (keyword >= 0) && url.toLowerCase().indexOf("search?q=") >= 0) { return "PROXY 10.0.0.4:3128"; } return "DIRECT"; }
What does this mean and what else can I do to test functionality. Thanks in advance!
Hello Secita This API is not working with iOS 8. It seems they've implemented something in this new version... It works for me with Google HTTP, but Siri redirects to Google HTTPS, which does not work in iOS 8
OK - thanks for the heads up. That is a pain - trust Apple! How do you use Google HTTP?
Haha! You can just type in Safari: http://www.google.com/search?q=Siri You'll be redirected to your proxy then (if it's working properly) But if you try HTTPS (https://www.google.com/search?q=Siri), it will not
Thanks!
What are my options for doing voice commands through the python3 server and squid proxy on the Pi? The concept and design are great!
On Tue, Nov 11, 2014 at 8:10 PM, purceno notifications@github.com wrote:
Hello Secita This API is not working with iOS 8. It seems they've implemented something in this new version... It works for me with Google HTTP, but Siri redirects to Google HTTPS, which does not work in iOS 8
— Reply to this email directly or view it on GitHub https://github.com/HcDevel/Siri-API/issues/2#issuecomment-62590364.
There are some other options... See this link: http://diyhacking.com/best-voice-recognition-software-for-raspberry-pi/ I've tested one (the one that they explaing how to install), and it works just fine... but there is no interaction with Siri. Anyway, is an option ;)
I do want to use an iDevice or Android and take advantage of the accurate voice recognition that those vendors provide.
On Tue, Nov 11, 2014 at 8:31 PM, purceno notifications@github.com wrote:
There are some other options... See this link: http://diyhacking.com/best-voice-recognition-software-for-raspberry-pi/ I've tested one (the one that they explaing how to install), and it work just fine... but there is no interaction with Siri. Anyway, is an option ;)
— Reply to this email directly or view it on GitHub https://github.com/HcDevel/Siri-API/issues/2#issuecomment-62593542.
That produces a response on the server.py terminal window: 10.0.0.11 - - [11/Nov/2014 20:36:58] "GET /proxy.pac HTTP/1.1" 200 - The config seems to work!?
This message is shown in server.py terminal when you open the browser (configured with the proxy file). When you try to open Google HTTP it should display another message like this, slightly different
does the Googolplex workaround work? Maybe not because its still HTTP not HTTPS. I appreciate your help on this!
Actually no =/ Googolplex does not work in iOS 8 either... Let me know if you find anything new, I tried many things, but none of them worked in Siri
I will! This is perplexing, no pun intended.
Apple don't want their precious Siri used for anything other than what they intend - I guess.
That's true.... =/
I installed Dragon Go! "Voice Commands 1.3" on my iPhone 4 (IOS 7.1 - not jailbreakable) and it seems to work quite well. However, still getting 10.0.0.20 - - [11/Nov/2014 22:25:30] "GET /proxy.pac HTTP/1.1" 200 - /proxy.pac in the server.py terminal. Its a start!
Any idea how to stop squid easily
Is there a way to troubleshoot this environment via debugging techniques, log files, or terminal output, etc? My iPad in running IOS 8.1 and therefor is no longer supported. I downloaded Dragon Go! (creators of Siri) Voice Command on a iPhone 4 and that does much the same thing. I changed the Key word from "Siri" to "plex" and start requests with "Google plex ...". It has the same effect as Google HTTP. I get a message on the python3 server terminal window (as in two comments above). No entries in access.log though. What connections are being made and what are not and how to I tell? Thanks in advance.
Hi Purceno The good news is that the Pi environment with squid and Siri-API works via http in safari on iPhone - switches lights on and off via commands.py code as it should. Voice Command does convert voice to text well though it uses the Google search window rather than the URL window. I just need to fix that last issue to get the whole show rocking and rolling!
Hi Secita, good news! Yes, it works for me via Google HTTP in Safari too. The problem is with HTTPS, as Siri redirects Safari to Google HTTPS when any search is requested
i'have start the server, I see lines in the terminal but it is google that normally appears
root@ubuntu:~/Siri-API# python3 server.py Starting Server... Server listening on port 3030... Press enter to exit/proxy.pac 192.168.0.3 - - [26/Apr/2014 04:33:07] "GET /proxy.pac HTTP/1.1" 200 - /proxy.pac 192.168.0.3 - - [26/Apr/2014 04:33:09] "GET /proxy.pac HTTP/1.1" 200 - /proxy.pac 192.168.0.3 - - [26/Apr/2014 04:34:05] "GET /proxy.pac HTTP/1.1" 200 - /proxy.pac 192.168.0.3 - - [26/Apr/2014 04:34:07] "GET /proxy.pac HTTP/1.1" 200 - /proxy.pac 192.168.0.3 - - [26/Apr/2014 04:34:48] "GET /proxy.pac HTTP/1.1" 200 - /proxy.pac 192.168.0.3 - - [26/Apr/2014 04:34:48] "GET /proxy.pac HTTP/1.1" 200 - /proxy.pac 192.168.0.3 - - [26/Apr/2014 04:35:37] "GET /proxy.pac HTTP/1.1" 200 - /proxy.pac 192.168.0.3 - - [26/Apr/2014 04:35:38] "GET /proxy.pac HTTP/1.1" 200 - /proxy.pac 192.168.0.3 - - [26/Apr/2014 04:36:28] "GET /proxy.pac HTTP/1.1" 200 -