声明:部署仅用于测试企业FRP加密流量的阻断情况,程序仅运行,不进行安装。
下载执行程序及配置文件
访问网盘 https://pan.yangzihome.space ,搜索NPS,下载服务端
下载操作系统对应的服务端程序,配置如下(nps.conf):
appname = nps
runmode = dev
http_proxy_ip=0.0.0.0
http_proxy_port=80
https_proxy_port=443
https_just_proxy=true
https_default_cert_file=conf/server.pem
https_default_key_file=conf/server.key
bridge_type=tcp
#服务端口
bridge_port=8024
bridge_ip=0.0.0.0
# Public password, which clients can use to connect to the server
# After the connection, the server will be able to open relevant ports and parse related domain names according to its own configuration file.
public_vkey=123
#Traffic data persistence interval(minute)
#Ignorance means no persistence
#flow_store_interval=1
# log level LevelEmergency->0 LevelAlert->1 LevelCritical->2 LevelError->3 LevelWarning->4 LevelNotice->5 LevelInformational->6 LevelDebug->7
log_level=7
#web服务
web_host=a.o.com
#账号admin
web_username=admin
#密码123(请修改)
web_password=123
#后台端口
web_port = 8080
web_ip=0.0.0.0
web_base_url=
web_open_ssl=false
web_cert_file=conf/server.pem
web_key_file=conf/server.key
# if web under proxy use sub path. like http://host/nps need this.
#web_base_url=/nps
#Web API unauthenticated IP address(the len of auth_crypt_key must be 16)
#Remove comments if needed
#auth_key=test
auth_crypt_key =1234567812345678
#allow_ports=9001-9009,10001,11000-12000
#Web management multi-user login
allow_user_login=false
allow_user_register=false
allow_user_change_username=false
#extension
allow_flow_limit=false
allow_rate_limit=false
allow_tunnel_num_limit=false
allow_local_proxy=false
allow_connection_num_limit=false
allow_multi_ip=false
system_info_display=false
#cache
http_cache=false
http_cache_length=100
#get origin ip
http_add_origin_header=false
#pprof debug options
#pprof_ip=0.0.0.0
#pprof_port=9999
#client disconnect timeout
disconnect_timeout=60
Linux 部署
执行命令程序(程序无需安装)
sudo chmod 755 nps
./nps
[I] [nps.go:202] the version of server is 0.26.10 ,allow client core version to be 0.26.0
[I] [connection.go:36] server start, the bridge type is tcp, the bridge port is 8024
[I] [server.go:200] tunnel task start mode:httpHostServer port 0
[I] [connection.go:71] web management start, access port is 8080
[I] [connection.go:62] start https listener, port is 443
[I] [connection.go:53] start http listener, port is 80
访问后台http://ip:8080,账号:admin,默认密码:123
Windows 部署
CMD执行命令运行(请勿关闭CMD)
./nps
Docker部署(推荐)
上传config配置文件(修改下方命令中的conf目录为实际目录)
docker run -d --name nps --net=host -v <本机conf目录>:/conf ffdfgdfg/nps
配置客户端
1、登录后台,新增客户端
2、填写客户端配置信息
问题
1、程序可能触发杀毒软件,请将程序性加入白名单
2、程序执行过程中可能出现服务器80、443端口占用情况,推荐使用docker部署