Total Pageviews

Monday, 6 June 2016

一个HTTP proxy程序-shim

shim -- wedge this HTTP proxy between your browser and Tor 


You'll need Libevent 2 or greater!

How to Build and Install

1. Install Libevent 2 somewhere if it hasn't been already.
2. ./configure
3. make
4. make install

* If you installed Libevent somewhere non-standard, you might need to export
PKG_CONFIG_PATH or LIBEVENT_CFLAGS and LIBEVENT_LIBS environment variables, and
then run ./configure again.

* If you're concerned about the proxy making direct connections (including
connections to HTTP servers and DNS servers), you can add the
--disable-direct-connections switch to configure. This will force you to
run shim with a SOCKS 4a server, returning an error message if one isn't

* If you're trying to debug a problem, and you're using GNU GCC, GDB etc,
you can:

 make clean
 make CFLAGS='-g -Wall'

... to prevent optimization that might interfere with your GDB sessions.

Command Line Arguments

shim [-l host] [-p port] [-qVv] [socks proxy]

 The address to listen on, or "any" to listen on all available
 interfaces. The default listen address is

 The port to listen on. Default is 8123.

 Decrease verbosity. You can specify this option more than once.

 Increase verbosity. You can specify this option more than once.

 Print the version and exit.

socks proxy
 This is an optional argument specifying the SOCKS server to make
 connections through. SOCKS proxies are specified like this:


 Recognized SOCKS versions are socks4 and socks4a. With socks4, all
 host names are resolved through your name server, while with socks4a,
 host names are passed to your SOCKS server. The port is optional. By
 default it is set to 1080.

 To use shim with a typically-configured Tor:


 If you built shim with --disable-direct-connections, you'll want

Where to Report Bugs

Christopher Davis <>