本文最后更新于 2026年5月11日。
服务器端:
“`
[common]
bind_port = 7000 # 可自己定义设置
bind_udp_port = 7000 # 可自己定义设置,启动xtcp的关键,并不是能穿通所有网关
vhost_http_port = 8080 # http服务端口,开启后服务端完成通过域名访问部署于内网的 Web 服务部署,这里将 HTTP 访问端口设为 8080
vhost_https_port = 443 # https服务端口
token = 123456 # 自己设置
dashboard_port = 3777 # 自己设置
dashboard 用户名密码,默认都为 admin
dashboard_user = admin
dashboard_pwd = admin
超时时间为秒,如果没有报错,可以不设置
heartbeat_timeout = 90
user_conn_timeout = 60
vhost_http_timeout = 90
“`
被连接端:
“`
[common]
server_addr = 39.106.107.128
server_port = 7000
token = 123456 # 跟服务器的token一致
[rdp]
type = stcp
只有 sk 一致的用户才能访问到此服务
sk = abcdefg
local_ip = 127.0.0.1
远程桌面的本地端口号
local_port = 3389
连接端:
[common]
server_addr = 39.106.107.128
server_port = 7000
[rdp_visitor]
type = stcp
stcp 的访问者
role = visitor
要访问的 stcp 代理的名字
server_name = rdp
只有 sk 一致的用户才能访问到此服务
sk = abcdefg
绑定本地端口用于访问 远程桌面 服务
bind_addr = 127.0.0.1
bind_port = 6000
“`
使用127.0.0.1:6000即可访问客户端的远程服务。