Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Error in DNS.rb #483

Closed
hwaterke opened this issue Mar 15, 2013 · 16 comments
Closed

Error in DNS.rb #483

hwaterke opened this issue Mar 15, 2013 · 16 comments

Comments

@hwaterke
Copy link

There is an error in the dns.rb file.
Ruby is complaining that MatchData object doesn't respond to the method respond!

To fix it, replace line 56 which is:

match(/guzzoni.apple.com/, Resolv::DNS::Resource::IN::A) do |_host, transaction|

By

match(/guzzoni.apple.com/, Resolv::DNS::Resource::IN::A) do |transaction|

Cheers.

H.

@akston
Copy link
Contributor

akston commented Mar 15, 2013

This worked for me so I went ahead and made a pull request. Thanks for the fix HaroldW!

@ToddLorey
Copy link

That worked for me! I had the same issue as sandwh1ch from issue #481.
I knew one of you smart folks out there would figure it out. Thanks!

@elvisimprsntr
Copy link
Collaborator

i suspect this problem has more to do with the linux libraries when one compiles ruby, since I nor apparently Pete encountered the problem. Try updating your distro, reinstall rvm, ruby and SP.

root@raspberrypi:~# siriproxy server -d 192.168.69.97 WARN: Unresolved specs during Gem::Specification.reset: rake (>= 0) WARN: Clearing out unresolved specs. Please report a bug if this causes problems. [Info - Configuration] Loading plugins -- If any fail to load, runsiriproxy bundle(notbundle install) to resolve. {"redeye"=>"living room", "room"=>"living room", "device"=>"tv", "feed"=>"antenna"} [Notice - Server] ======================= WARNING: Running as root ============================= [Notice - Server] You should use -l or the config.yml to specify and non-root user to run under [Notice - Server] Running the server as root is dangerous. [Notice - Server] ============================================================================== [Info - Server] Starting SiriProxy on 0.0.0.0:443... [Info - Server] DNS server is not running yet, waiting 1 second... [Info - Server] DNS Server started, tainting 'guzzoni.apple.com' with 192.168.69.97 [Info - Server] SiriProxy up and running. {"redeye"=>"living room", "room"=>"living room", "device"=>"tv", "feed"=>"antenna"} [Info - Plugin Manager] Plugins loaded: Example, RedEye, Isy99i, NestLearningThermostat, IPCam, PictureJokes [Info - iPhone] Received Object: LoadAssistant [Info - iPhone] Received Object: SetRestrictions [Info - iPhone] Received Object: ClearContext [Info - iPhone] Received Object: SetBackgroundContext [Info - iPhone] Received Object: StartSpeechRequest [Info - Guzzoni] Received Object: AssistantLoaded [Info - iPhone] Received Object: SetRequestOrigin [Info - Guzzoni] Received Object: SetConnectionHeader [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: SpeechPacket [Info - iPhone] Received Object: FinishSpeech [Info - Guzzoni] Received Object: SpeechRecognized [Info - Plugin Manager] Processing 'Test Siri proxy ' [Info - Plugin Manager] Processing plugin Example [Info - Plugin Manager] Matches (?i-mx:test siri proxy) [Info - Plugin Manager] Applicable states: [Info - Plugin Manager] Current state: [Info - Plugin Manager] Matches, executing block [Info - Plugin Manager] Say: Siri Proxy is up and running! [Info - Plugin Manager] Sending Request Completed [Info - iPhone] Received Object: Metrics

@ToddLorey
Copy link

Elvis,
First of all, I'd like to thank you and Plamoni for your efforts!!!
I actually used your most recent RPi image, so I'm surprised you didn't see the problem. In case it helps (or matters), my configuration is a RPi with RPi-Debian-SiriProxy-2013-03-14.img. I have an ASUS RT-N66U router running RMerlin's latest firmware, with an iPhone 4S as the Siri interface. The RPi' MAC addy has a fixed IP addy assigned on the router, with all of the IP settings on the RPi left at defaults from the image.
When I made the edit that HaroldW suggested and did a "siriproxy bundle", it started working.
Cheers

@elvisimprsntr
Copy link
Collaborator

Yes, by assigning a static IP using the MAC in the router then you don't need to mess with the interfaces or resolv.conf files. The only difference is I am using an iPhone 5 and you have a 4S. I wonder if Pete also has an iPhone 5. I wouldn't have suspected there would have been an iPhone hardware dependancy. I will have to differ to Pete.

FYI, I'm not familiar with RMerlin's firmware, but I personally prefer the open source firmware from www.dd-wrt.com, which I confirmed your router model is supported. The advantage is one can perform transparent DNS redirect in the router which eliminates the need to change the DNS entry on the phone itself or running RUBYDNS (or DNSMASQ) on the RPi. The www.dd-wrt.com firmware is also easy to set up a PPTP VPN server which allows one to access siriproxy over the cell network.

@akston
Copy link
Contributor

akston commented Mar 15, 2013

The issue for me involves the iPhone 4S and Mac OSX 10.8.3.

@ToddLorey
Copy link

I had a look to see if RMerlin's firmware will allow transparent DNS redirect, and it doesn't appear in any of the documentation or in a google search.

I agree... to a degree... :) that it would be good to have the router perform the DNS redirect.

On the other hand, I've found that I can enter two addresses in my iPhone's WiFi setup DNS field separated by a comma. I put the RPi's address first, then the router's address next. This way, it tries the RPi first, but if the RPi isn't running, it then tries the router itself. It seems to work for me and it provides the advantage that I can easily turn off redirecting traffic to the RPi on my phone without having to change anything on the router.

Here's what the DNS field on my iPhone looks like:
10.0.0.13, 10.0.0.1
Hope that makes sense.

@elvisimprsntr
Copy link
Collaborator

Nice tip! The downside is if you did use a VPN over cellular, you would have to set the proxy options in the VPN config. Using the transparent method in the router makes all the manual DNS entries unnecessary.

@ToddLorey
Copy link

I haven't dabbled in the VPN features yet. That's actually one of the big features in RMerlin's custom firmware. I may play with it in the future, which will push me towards the router transparent DNS redirect. It would seem that I could also use the router DNS redirect to play tricks on my wife. ;), like sending her to a webpage of something that I want her to buy for me. It also could have other nefarious uses that unscrupulous folks might exploit if they had access to the router.

@elvisimprsntr
Copy link
Collaborator

LOL. Or redirect her from those expensive jewelry sites, to a site for power tools!

@laxman01
Copy link

How would one do that. Cause that sounds like you could have some fun with that.

@ToddLorey
Copy link

The redirect for the Siri server works like this:
address=/guzzoni.apple.com/{your siriproxy server IP}

So I think all you'd have to do is add another line, assuming you had her iPhone set to use the SiriProxy server as a DNS address:
address=/tiffany.com/snapon.com

@laxman01
Copy link

That's really interesting I need thought to do anything like that. Thanks

@elvisimprsntr
Copy link
Collaborator

That's a subject for another forum, but here you go. http://www.instructables.com/id/URL-Redirect-Prank-using-dd-wrt/#step1

Before you do, you might want to configure keyword blocking for words like "divorce lawyer" "undetectable poisons"

@erezacohen
Copy link

Thanks Harold!
worked for me :)

@elvisimprsntr
Copy link
Collaborator

fixed in SP 0.5.3. perform siriproxy update from 0.5.2 until new gem is available

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants