1. 作为服务端
# 运行服务端
./overfrp
# 添加公钥到服务器
./overfrp addkey "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAAB..."
配置文件 app.conf 内容:
http_manage {
listen 0.0.0.0:4577;
user user:password;
# 任何人都可以访问
# user *;
allow 0.0.0.0 127.0.0.1;
enable;
}
server {
listen 0.0.0.0:12345;
authentication_required on;
public_key_auto_login off;
}
2. 作为服务提供者 publish
# 创建新的密钥对,然后发给服务端进行添加 addkey
./overfrp newkey publish-key
# 密钥添加完成后,校验 server 指定的服务器
./overfrp server-check 122.33.44.55:12345 --authenticate-as publish-key
# 获取节点 botnet ID
[code]./overfrp register 122.33.44.55:12345 --authenticate-as publish-key
./overfrp server-check 127.0.0.1:12345 --authenticate-as publish-key[/code]
# docker 没有安装服务的功能,因此 --install-as 会报错
./overfrp --config publish.conf
# 如果服务只有一个配置文件,直接用默认的 app.conf 就行,就不用单独写 --config 了
./overfrp
配置文件 app.conf 内容为:
http_manage {
listen 0.0.0.0:4577;
user user:password;
# 任何人都可以访问
# user *;
allow 0.0.0.0 127.0.0.1;
enable;
}
publish {
server 122.33.44.55:12345;
authenticate_as publish-key;
botnet "rjQn7/rXXn/A4ezzyiu3AA==";
# host_key_auto_accept;
}
3. 作为通道 tunnel
# 创建新的密钥对,然后发给服务端进行添加 addkey
./overfrp newkey publish-key
# 密钥添加完成后,校验 server 指定的服务器
./overfrp server-check 122.33.44.55:12345 --authenticate-as publish-key
./overfrp server-check 127.0.0.1:12345 --authenticate-as publish-key
# docker 没有安装服务的功能,因此 --install-as 会报错
./overfrp --config publish.conf
# 如果服务只有一个配置文件,直接用默认的 app.conf 就行,就不用单独写 --config 了
./overfrp
配置文件 app.conf 内容为:
http_manage {
listen 0.0.0.0:4577;
user user:password;
# 任何人都可以访问
# user *;
allow 0.0.0.0 127.0.0.1;
enable;
}
tunnel {
listen 0.0.0.0:4588;
target www.baidu.com:443;
server 127.0.0.1:4578;
# 新版 240408
server_options {
botnet 'tDICc3JLvU6rENR5s9PRlA==';
authenticate_as ecdsa;
}
host_key_auto_accept off;
ssl_off_loading on;
keep_http_host on;
}