Created
January 4, 2012 07:09
-
-
Save chuchomtz/1558903 to your computer and use it in GitHub Desktop.
Run SiriProxy on Lion (using methoddk's gist)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Here's how you get it working on Mac OSX Lion 10.7.2 | |
#- You need Xcode installed (get in in Mac App Store for free) | |
#- Install latest MacPorts | |
# On my iPhone, I set the DNS server to 192.168.1.xxx (the IP of the Mac) | |
# | |
# 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 port install dnsmasq | |
sudo port install openssl | |
#edit the dnsmasq conf | |
sudo vi /opt/local/etc/dnsmasq.conf | |
# Keystrokes in vi: | |
# /address= | |
# A <enter> address=/guzzoni.apple.com/192.168.1.xxx <--This is the IP of the Mac | |
# <esc> :wq! | |
#Load dnsmasq | |
sudo port load dnsmasq | |
#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 --with-gcc=clang | |
#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 /opt/local/etc/openssl/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.com | |
# 1.commonName_max = 64 | |
# | |
#Save and quit vi (Press esc, type :wq! and press Enter.) | |
#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 (domain1.com) | |
### IMPORTANT: and guzzoni.apple.com SECOND (domain2.com). 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 | |
cp ca.key ca.crt server.key.secure server.csr server.passless.crt server.passless.key ~/.siriproxy | |
#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 | |
#This was taken form methoddk's gist: https://gist.github.com/1552448 and adapted to run using MacPorts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment