MCPcopy Index your code
hub / github.com/csznet/goForward

github.com/csznet/goForward @v1.2.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.4 ↗ · + Follow
38 symbols 103 edges 7 files 29 documented · 76%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

使用 golang 实现的 tcp udp 端口转发

目前已实现:

  • 规则热加载
  • web 管理面板
  • 流量统计

支持:Linux、Windows、MacOS(MacOS 需要自行编译)

截图

image

使用

Linux 下载

sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/csznet/goForward/main/get.sh)"

运行

./goForward

参数

TCP 无传输超时关闭 默认 60,单位秒

./goForward -tt 18000

自定义 web 管理端口

./goForward -port 8899

指定 IP 绑定

./goForward -ip 1.1.1.1

指定数据库位置

./goForward -db /root/data.db

设置 web 管理访问密码

./goForward -pass 666

当 24H 内同一 IP 密码试错超过 3 次将会 ban 掉

开机自启

创建 Systemd 服务

sudo nano /etc/systemd/system/goForward.service

输入内容

[Unit]
Description=Start goForward on boot

[Service]
ExecStart=/full/path/to/your/goForward -pass 666

[Install]
WantedBy=default.target

其中的/full/path/to/your/goForward改为二进制文件地址,后面可接参数

重新加载 Systemd 配置

sudo systemctl daemon-reload

启用服务

sudo systemctl enable goForward

启动服务

sudo systemctl start goForward

检查状态

sudo systemctl status goForward.service

Core symbols most depended-on inside this repo

NormalizeAddr
called by 4
sql/sql.go
Run
called by 3
forward/forward.go
GetForwardList
called by 3
sql/sql.go
rmSpaces
called by 3
sql/sql.go
copyBytes
called by 2
forward/forward.go
GetAction
called by 2
sql/sql.go
GetForward
called by 2
sql/sql.go
FreeForward
called by 2
sql/sql.go

Shape

Function 28
Method 6
Struct 4

Languages

Go100%

Modules by API surface

sql/sql.go16 symbols
forward/forward.go11 symbols
web/web.go3 symbols
utils/utils.go3 symbols
conf/conf.go3 symbols
main.go2 symbols

For agents

$ claude mcp add goForward \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact