Skip to content

Tunnel over HTTP proxy (tun2http) for Linux/MacOS (TCP/DNS/IPv4/IPv6)

License

Notifications You must be signed in to change notification settings

surbiks/hev-http-tunnel

 
 

Repository files navigation

HevHttpTunnel

status

A tunnel over HTTP proxy for Unix.

Features

  • Redirect TCP connections.
  • Redirect DNS queries. (over http proxy)
  • IPv4/IPv6. (dual stack)
  • Linux/MacOS.

How to Build

Unix:

git clone --recursive git://github.com/heiher/hev-http-tunnel
cd hev-http-tunnel
make

Android:

mkdir hev-http-tunnel
cd hev-http-tunnel
git clone --recursive git://github.com/heiher/hev-http-tunnel jni
ndk-build

How to Use

Config

tunnel:
  # Interface name
  name: tun0
  # Interface MTU
  mtu: 4096
  # IPv4 address
  ipv4:
    address: 10.0.0.2
    gateway: 10.0.0.1
    prefix: 30
  # IPv6 address
  ipv6:
    address: 'fc00::2'
    gateway: 'fc00::1'
    prefix: 126
  # Domain name service
  dns:
    port: 53

# Upstream DNS
dns:
  # DNS port (TCP)
  port: 5353
  # DNS address (ipv4/ipv6)
  address: 208.67.222.222

# Http Proxy
servers:
  srv:
    # Http server port
    port: 80
    # Http server address (ipv4/ipv6)
    address: 127.0.0.1

#misc:
   # null, stdout, stderr or file-path
#  log-file: null
   # debug, info, warn or error
#  log-level: warn
   # If present, run as a daemon with this pid file
#  pid-file: /run/hev-http-tunnel.pid
   # If present, set rlimit nofile; else use default value
#  limit-nofile: 1024

Run

bin/hev-http-tunnel conf/main.yml

# Bypass upstream http server
sudo ip route add HTTP_SERVER dev DEFAULT_IFACE metric 10

# Route others
sudo ip route add default dev tun0 metric 20

Contributors

License

MIT

About

Tunnel over HTTP proxy (tun2http) for Linux/MacOS (TCP/DNS/IPv4/IPv6)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 96.0%
  • Makefile 4.0%