Skip to content

Commit

Permalink
Added option in Config for unknown devices
Browse files Browse the repository at this point in the history
It is disabled by default, and you just need to remove the # in front
of it.
  • Loading branch information
ThPryrChn committed Jun 21, 2012
1 parent 4039646 commit 4c11b77
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 6 additions & 1 deletion config.example.yml
Expand Up @@ -39,7 +39,12 @@ hours_till_key_expires: 24
regenerate_interval: 3600

#The try_iPad3 option will let the server use iPad3 keys if there are no 4S keys avaliable. Only works for dictation.
try_iPad3: true
#try_iPad3: true

#With the allow_unknown_clients option, it allows Aidriod devices, and any other siri ports to use the server.
#It is disabled by default, because it also allows DOS attacks

#allow_unknown_clients: true

#For Generating Certs for iPhones. Has 2 hosts, so that you can use guzzoni on a 4S,
#and your server also using the same instance.
Expand Down
8 changes: 5 additions & 3 deletions lib/siriproxy/connection.rb
Expand Up @@ -592,9 +592,11 @@ def receive_line(line) #Process header
#Change unknown to iPhone to make sure everything works..
self.close_connection() #close connections
self.other_connection.close_connection() #close other
puts "[Info - SiriProxy] Unknow Device Connected from IP #{self.clientip}"
self.is_4S = false
self.is_iPad3 = false
puts "[Info - SiriProxy] Unknow Device Connected from IP #{self.clientip}"
if $APP_CONFIG.allow_unknown_clients!=true
self.is_4S = false
self.is_iPad3 = false
end
@devicetype="Unknown Device"
puts "[Info - SiriProxy] Original Header: " + line if $LOG_LEVEL > 2
line = "User-Agent: Assistant(iPhone/iPhone4,1; iPhone OS/5.0.1/9A405) Ace/1.0"
Expand Down

0 comments on commit 4c11b77

Please sign in to comment.