Skip to content

Instantly share code, notes, and snippets.

@cyrixhero
Forked from majestrate/i2p inproxy howto v0.1
Created March 27, 2018 15:41
Show Gist options
  • Save cyrixhero/5fc22bac99ef139931112f8b316e194b to your computer and use it in GitHub Desktop.
Save cyrixhero/5fc22bac99ef139931112f8b316e194b to your computer and use it in GitHub Desktop.
BEWARE: THIS GUIDE IS OUTDATED
#
# this is a howto for an i2p inproxy from the best of my recollection
# you will need: nginx, squid3, polipo, i2p and a good vps provider that doesn't suck ass
#
# this setup uses nginx as load balancer + logger, squid for transparent proxy and polipo for interfacing with i2p socks proxy
#
# client => nginx -> squid -> polipo -> i2p socks -> i2p => eepsite
#
# you need a to have your DNS have have an entry *.yourdomain.tld pointing at x.x.x.x
#
--- begin i2ptunnel.config ---
tunnel.0.description=Socks Proxy I2P
tunnel.0.interface=127.0.0.1
tunnel.0.listenPort=1080
tunnel.0.name=SOCKS
tunnel.0.option.i2cp.closeIdleTime=1800000
tunnel.0.option.i2cp.closeOnIdle=false
tunnel.0.option.i2cp.delayOpen=false
tunnel.0.option.i2cp.newDestOnResume=false
tunnel.0.option.i2p.streaming.connectDelay=0
tunnel.0.option.i2p.streaming.maxWindowSize=16
tunnel.0.option.i2ptunnel.useLocalOutproxy=false
tunnel.0.option.inbound.backupQuantity=2
tunnel.0.option.inbound.length=0
tunnel.0.option.inbound.lengthVariance=0
tunnel.0.option.inbound.nickname=SOCKS
tunnel.0.option.inbound.quantity=4
tunnel.0.option.outbound.backupQuantity=3
tunnel.0.option.outbound.length=0
tunnel.0.option.outbound.lengthVariance=0
tunnel.0.option.outbound.nickname=SOCKS
tunnel.0.option.outbound.quantity=4
tunnel.0.option.outproxyAuth=false
tunnel.0.option.persistentClientKey=true
tunnel.0.privKeyFile=i2p.inproxy-privkeys.dat
tunnel.0.sharedClient=false
tunnel.0.startOnLoad=true
tunnel.0.type=sockstunnel
--- end i2ptunnel.config ---
--- begin squid3 config ---
# probably done wrong and may need more/different options
http_port 8000 transparent
http_access allow localhost
http_access deny all
cache_peer 127.0.0.1 parent 8080 0 default
--- end squid3 config ---
--- begin polipo config ---
# block sites with /etc/polipo/forbidden
logSyslog = false
logFile = /dev/null
socksParentProxy=127.0.0.1:1080
socksProxyType=socks5
diskCacheRoot=""
proxyAddress="127.0.0.1"
proxyPort=8000
--- end polipo config ---
--- begin nginx config ---
server {
listen x.x.x.x:80;
server_name ~^(?<sitename>.*)\.yourdomain\.tld;
access_log /var/log/nginx/i2p.access.log;
set $site $sitename.i2p;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $site;
proxy_pass http://127.0.0.1:8000/;
proxy_redirect off;
}
}
--- end nginx config ---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment