1 Star 0 Fork 0

junqirao / tunn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README_EN.md 3.16 KB
一键复制 编辑 原始数据 按行查看 历史
junqirao 提交于 2022-06-16 17:47 . 版本更新->1.1.0

Tunn - NetworkTunnel


中文文档 | English


Features


Supported OS

tested:

  • Windows 7/10/11
  • CentOS 7.x
  • Ubuntu 20.x

may support:

  • Windows 7+
  • Linux release supports tun device

Supported transmit protocols

TCP / KCP / WS / WSS

Supported encryption methods

AES256 / AES192 / AES128 / XOR / SM4 / TEA / XTEA / Salsa20 / Blowfish

Updates


2022/06/16 @ 1.1.0.220616

  • WebUI remote config
  • WebUI flow usage query
  • WebUI flow limit & speed limit display
  • add reconnection conditions

2022/05/31 @ 1.0.0.220531

  • WebUI
  • automatic import system route table
  • config from client

2022/05/10 @ 0.0.1

  • detached from project Tunnel

2022/05/09 @ history

  • work in NAT network
  • windows support
  • packet CRC32 checksum
  • ws/wss/tcp/kcp support
  • network export / import
  • multi connection
  • data encrypt
  • ...

Compile


Needs Go1.18.2 or higher download
Needs nodejs download

preparation

#clone repository
git clone https://github.com/yaooovesm/tunn.git

#change directory to tunn
cd ./tunn

Compile WebUI

#@ tunn/
#change directory to tunn/webui
cd webui

#dependencies
npm install

#build
npm run build

! after build, move 'dist' to tunn/cmd and rename as 'static'

or

use static.zip

unzip assets/static.zip -d cmd/

Compile Tunn

#dependencies
set GO111MODULE=on
go mod tidy

#change direction to tunn/cmd
cd cmd
# @linux
go build -o tunn

or

# @windows
go build -o tunn.exe

Use


Client config example

Config File

Descriptions

#Hub account
user.Account
#Hub password (auto login if password were set)
user.Password

#authentication server address
auth.Address
#authentication server port
auth.Port

#Hub certification
security.cert

#admin webui address
admin.address
#admin webui port
admin.port
#admin webui user
admin.user
#admin webui password
admin.password

Example

{
  "user": {
    "Account": "account",
    "Password": "password"
  },
  "auth": {
    "Address": "aaa.bbb.ccc",
    "Port": 10241
  },
  "security": {
    "cert": "cert.pem"
  },
  "admin": {
    "address": "127.0.0.1",
    "port": 8080,
    "user": "admin",
    "password": "P@ssw0rd"
  }
}

Startup

! forward function should be enabled, when export network in Linux client

#enable ip forward in kernel
echo 1 > /proc/sys/net/ipv4/ip_forward
#setup iptables
#e.g. iptables -t nat -A  POSTROUTING -s 192.168.0.0/24 -j MASQUERADE
iptables -t nat -A  POSTROUTING -s [tunn network] -j MASQUERADE

! Windows needs Privileges
! Windows needs download wintun driver with executable file

Start parameters

  • -c set witch config should load

Example:

# @linux
./tunn -c config.json

or

# @windows
tunn.exe -c config.json

Start up successfully like this

img

Open your browser img

Enter dashboard img

Go
1
https://gitee.com/jackrabbit872568318/tunn.git
git@gitee.com:jackrabbit872568318/tunn.git
jackrabbit872568318
tunn
tunn
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891