public
Created — forked from plamoni/gist:1428474

Line by line input for how I got SiriProxy running on a fresh install of Ubuntu 11.10

  • Download Gist
gistfile1.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
#Here's what I did to get to the point where I'm at:
 
#-Install Ubuntu 11.10
#-Get all available updates
#-Add the VirtualBox add-ons and video driver
#-Set up SSH (for the SCP at the end)
#
# I have done nothing else to this virtual machine.
 
# On my iPhone, I set the DNS server to 192.168.2.131 (the IP of the virtual machine)
#
# That's all the pre-setup that was done on the iPhone (the certificate is installed as part of the process)
 
# Here are the exact steps steps I followed:
 
#Install all the prerequisites
sudo apt-get install dnsmasq ruby build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
 
#edit the dnsmasq conf
sudo vi /etc/dnsmasq.conf
 
# Keystrokes in vi:
# /address=
# A <enter> address=/guzzoni.apple.com/192.168.2.131 <--This is the IP of the VM
# <esc> :wq!
 
#Restart dnsmasq
sudo /etc/init.d/dnsmasq restart
 
#Install RVM
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
 
#Set RVM path
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
 
#Set the RVM path to be set up every time I log in
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
 
#Install Ruby 1.9.3 -- This will take several minutes
rvm install 1.9.3
 
#Use ruby 1.9.3 as the default (and current) version of ruby
rvm use 1.9.3 --default
 
#clone the SiriProxy repo
git clone git://github.com/westbaer/SiriProxy.git
 
#Enter the SiriProxy directory
cd SiriProxy
 
#Install SiriProxy -- Can take a minute or two
rake install
 
#Make the .siriproxy directory in my home directory
mkdir ~/.siriproxy
 
#Copy the example config
cp ./config.example.yml ~/.siriproxy/config.yml
 
#Edit openssl.cnf to allow for dual common names READ THIS CAREFULLY!
sudo vi /etc/ssl/openssl.cnf
 
#While in vi, scroll down until you see:
#
# commonName = Common Name (eg, YOUR name)
# commonName_max = 64
#
#and replace it with:
#
# 0.commonName = Common Name (eg, YOUR name)
# 0.commonName_default = www.domain1.com
# 0.commonName_max = 64
# 1.commonName = Common Name (eg, YOUR name)
# 1.commonName_default = www.domain2.org
# 1.commonName_max = 64
#
#Save and quit vi (Press esc, type :wq! and press Enter.)
 
#change to the ~/.siriproxy directory
cd ~/.siriproxy
 
#Generate the certificates (do these commands one at a time, carefully.)
### IMPORTANT: You can use whatever info you want when it asks for it, just make sure
### IMPORTANT: that for the common names you put your dnyDNS or no-ip domain FIRST
### IMPORTANT: and guzzoni.apple.com SECOND. Very important step.
 
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
 
openssl genrsa -des3 -out server.key 4096
openssl req -new -key server.key -out server.csr
 
openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.passless.crt
openssl rsa -in server.key -out server.key.insecure
 
mv server.key server.key.secure
mv server.key.insecure server.passless.key
 
 
#Install the certificate on the phone.
#Email ca.crt to your iPhone4S and iPhone 4
 
#Bundle SiriProxy (this installs the plugins and whatnot)
siriproxy bundle
 
#Start the server
rvmsudo siriproxy server

Hello! I think i made it work in Mac using MacPorts
Here's the gist:
https://gist.github.com/1558903

  1. Changed the paths to dnsmasq.conf and openssl.conf in the vi command accordingly.

  2. Forced rvm to install using:

    rvm install 1.9.3 --with-gcc=clang

  3. Added at the end of the certificates a command to copy all of them to ~/.siriproxy :

    cp ca.key ca.crt server.key.secure server.csr server.passless.crt server.passless.key ~/.siriproxy

You may add this if you want to your blog

Thanks! for the tips on using SiriProxy on the go!!

Hi,

I installed SiriProxy in ubuntu 11.10, generated ca.crt with dual cn and sent it to iPhone 4 & 4s.
I'm able to connect to siriproxy over 3g through my 4 but not through my 4s.

Any suggestions will be appreciated greatly.
Thanks in advance.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.