mirror of
https://gitee.com/konyshe/goodlink.git
synced 2025-09-26 20:51:22 +08:00
dbba58be5807a07bcead00395321c45799d54d05
特点介绍
-
一条命令搞定,无需安装、无需注册,无需公网IP,无需配置文件
-
仅需公网Redis服务,默认使用作者提供的免费 Redis 服务
-
P2P通信走QUIC,高性能,已加密
使用说明
工作模式 - 介绍
P2P代理模式
客户端需要指定本地监听端口,以提供Socks5代理服务
该模式需要在系统或者软件中配置Socket5代理,可访问服务端所处网络中的所有主机
P2P转发模式
服务端需要指定所处网络中的某一个主机端口,客户端也需要指定本地监听端口。
该模式无需配置Socks5代理,直接访问客户端指定的本地监听端口,等于访问服务端指定的主机端口。其他主机端口不能访问
P2P代理模式 - 举例
客户端运行在公司的电脑,服务端运行在家里的NAS。
在公司电脑上配置代理地址:socks5://127.0.0.1:18080,便可访问家里包括NAS在内的所有主机端口。
家里的NAS ( linux,Docker )
下载镜像:registry.cn-shanghai.aliyuncs.com/kony/goodlink
docker rm goodlink -f; docker run -d --name=goodlink --net=host --restart=always registry.cn-shanghai.aliyuncs.com/kony/goodlink --key= nas_202412140928
公司的电脑 ( windows, 命令行 )
.\goodlink-windows-amd64.exe --local=0.0.0.0:18080 --key=nas_202412140928
注:服务端和客户端均支持命令行/ Docker 方式,以上仅作两种方式的举例。
P2P转发模式 - 举例
客户端运行在公司的电脑,服务端运行在家里的NAS。
在公司访问 http://127.0.0.1:9999 , 等于访问家里的NAS管理页面http://192.168.3.2:9999
家里的NAS (linux,Docker)
下载镜像:registry.cn-shanghai.aliyuncs.com/kony/goodlink
docker rm goodlink -f; docker run -d --name=goodlink --net=host --restart=always registry.cn-shanghai.aliyuncs.com/kony/goodlink --remote=127.0.0.1:9999 --key=nas_202412140928
公司的电脑 (windows, 命令行)
.\goodlink-windows-amd64.exe --local=0.0.0.0:9999 --key=nas_202412140928
注:服务端和客户端均支持命令行/ Docker 方式,以上仅作两种方式的举例。
选项说明
root@VM-4-9-ubuntu:~/go/src/goodlink# ./bin/goodlink-linux-amd64 -h
Usage of bin/goodlink-linux-amd64:
-gogo-background
后台执行
-gogo-restart-delay int
自动重启的延迟时间, 单位: 毫秒 (default 1000)
-key string
自定义, 请保证客户端和服务端一致。为避免冲突, 建议16-32个字节长度: {name}_{YYYYMMDDHHMM}, 例如: kony_202412140928
-local string
客户端监听的地址端口
-pprof_addr string
性能检测服务监听的地址端口, 例如: 0.0.0.0:6060
-redis_addr string
Redis服务地址端口, 例如: 1.2.3.4:6379
-redis_id int
Redis服务可使用的表ID, 例如: 15
-redis_pass string
Redis服务密码, 例如: 12345678
-remote string
服务端所处网络中, 需要被远程访问的主机地址端口, 例如: 192.168.3.2:9999
-v show version info
查看版本信息
注:P2P转发模式仅支持 TCP 协议,如果服务端需要转发多个 TCP端口,需同时执行多个命令或启动多个 Docker(--key不能重复)
自己如何编译
cd /root/go/src
git clone -b main https://gitee.com/konyshe/gogo.git
git clone https://gitee.com/konyshe/goodlink.git
cd goodlink
make clean; make
Description
Languages
Go
97.1%
Makefile
1.2%
Dockerfile
0.7%
Shell
0.6%
Batchfile
0.4%