QuotaGuard Static provides a wrapper script that transparently forwards all outbound TCP traffic through your Static IP. This is language independent but there are known issues with certain Node.js connections hanging so please contact us if you have any issues.


If you're not sure whether to use the SOCKS proxy check out our HTTP vs SOCKS article. 


Please note: The wrapper is not compatible with OSX or Windows. We recommend using a Virtual Machine running Ubuntu for development testing if your main development environment does not run Linux.  


Installing the QuotaGuard Static wrapper


Download and extract the wrapper in your app directory

 

$ cd /home/myuser/my-app

$ curl https://s3.amazonaws.com/quotaguard/quotaguard-socksify-latest.tar.gz | tar xz

$ echo "QUOTAGUARD-LICENSE.txt" >> .gitignore

$ git add bin/qgsocksify vendor/dante

$ git commit -m "Add QuotaGuard Static socksify"        

 

Now you can prepend the qgsocksify wrapper to your standard commands to transparently route all traffic through your Static IPs. For example to run a Rails server:

              

 

bin/qgsocksify rails s

 

            

Controlling what traffic goes through proxy


You can provide a standard subnet mask to only route traffic to certain IP subnets via the QUOTAGUARDSTATIC_MASK environment variable. The mask supports sub-network specifications (e.g., 192.0.2.22/24), single addresses (192.0.2.22/32), host names (e.g., ftp.example.org), or domain names (e.g., .example.org). A domain name specification will match any host in that domain.


 

export QUOTAGUARDSTATIC_MASK="100.30.68.0/24"

 


All outbound traffic to 100.30.68.* would be routed via your Static IPs. Multiple masks can be provided by comma separating the mask values:


export QUOTAGUARDSTATIC_MASK="100.30.68.0/24,99.29.68.0/24"


Getting Help

The SOCKS wrapper is not straight forward to set up or debug so if you have any issues just get in contact with us and we'll help you out.