Giter Site home page Giter Site logo

obfstunnel's Introduction

obfstunnel

Customizable network traffic tunneling tool

With obfstunnel, you can forward your traffic through firewall. Currently we have xor and random obfs method.

obfstunnel works both on client and server. When a user likes to connect to another server outside a firewall, he could run obfstunnel in CLIENT mode on his own machine, and run obfstunnel in SERVER mode on another machine outside firewall. User should set up a target host he wants connect to on SERVER side. After doing this, you can connect to localhost, where obfstunnel listen on specified port. Once user connected to localhost, obfstunnel will encode traffic and send to obfstunnel on SERVER side. On SERVER side, obfstunnel will connect to target host which user wants to, and forward user traffic.

                             firewall
[user] <----> [obfstunnel] <---||---> [obfstunnel] <----> [target host]
       direct              obfuscating               direct

Example

Tunneling SSH through firewall

We are in machine A, and wants to SSH to server B, but we can not direct connect to server B via SSH because a firewall is block SSH connection. obfstunnel can help us.

We will use obfstunnel builtin obfs method, the xor method. It just XOR every byte with 0xFF. There is another builtin obfs method which name is random method. The random method could make traffic like random traffic, so firewall could not detect SSH connection and could not block it.

On server side, or server B, we run obfstunnel like this:

obfstunnel -s 2000 -t localhost:22 -m xor

-s 2000 argument cause obfstunnel runs in SERVER mode and listen on port 2000 waiting for client connection.

-t localhost:22 tell obfstunnel forward traffic to localhost, where SSH service run on port 22.

-m xor tell obfstunnel to use xor obfs method.

On client side, or machine A, run obfstunnel like this:

obfstunnel -c 22 -t 1.1.1.1:2000 -m xor

-c 22 cause obfstunnel runs in CLIENT mode, waiting user connection on port 22.

-t 1.1.1.1:2000 tells obfstunnel where server is located. 1.1.1.1 is IP address of server A, 2000 is the port obfstunnel in SERVER mode listen on.

Now run ssh localhost , you will find you are connecting to server B.

obfstunnel's People

Contributors

greensea avatar rampagex avatar

Stargazers

Vladimir avatar Gilbert Huang avatar nextweb avatar  avatar xufinal avatar XiaoX avatar  avatar  avatar Bepartofyou-七曦 avatar XiaoLiqun avatar Sing Yu Chan avatar zxbiao avatar Akase Haruka avatar David.Gao avatar  avatar  avatar  avatar bizky avatar Well avatar  avatar fan avatar  avatar  avatar  avatar  avatar  avatar 库洛兰斯 avatar qiaogao avatar Justin Yang avatar  avatar Octatao Chen avatar  avatar Virtao avatar Earthson Lu avatar 寒晨 avatar

Watchers

 avatar Yue avatar James Cloos avatar Well avatar  avatar Hugo Almeida avatar blackswan avatar  avatar  avatar gsong avatar  avatar Mogumi avatar  avatar

obfstunnel's Issues

这样make出来的obfstunnel正常吗

hi.

root@AR:/obfstunnel# ls
COPYING obfstunnel.c README.md udpsession.c
Makefile obfstunnel.h README.zh_CN udpsession.h
root@AR:
/obfstunnel# make
gcc obfstunnel.c udpsession.c -o obfstunnel -O2 -Wall
obfstunnel.c: 在函数‘ot_tunneling_tcp_server’中:
obfstunnel.c:397:13: 警告:变量‘writeb’被设定但未被使用 [-Wunused-but-set-variable]
int readb, writeb;
^
obfstunnel.c: 在函数‘ot_accept_client’中:
obfstunnel.c:661:6: 警告:变量‘flags’被设定但未被使用 [-Wunused-but-set-variable]
int flags;
^
root@AR:/obfstunnel# ls
COPYING obfstunnel obfstunnel.h README.zh_CN udpsession.h
Makefile obfstunnel.c README.md udpsession.c
root@AR:
/obfstunnel#

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.