NPS

2022-06-09  本文已影响0人  zhYx_

简介

服务端

docker run -d \
--name=nps \
--net=host \
--restart=always \
-v /docker_data/nps/conf:/conf \
ffdfgdfg/nps:latest 
appname = nps
#Boot mode(dev|pro)
runmode = dev

#HTTP(S) proxy port, no startup if empty
http_proxy_ip=0.0.0.0
http_proxy_port=80
https_proxy_port=443
https_just_proxy=true
#default https certificate setting
https_default_cert_file=conf/server.pem
https_default_key_file=conf/server.key

##bridge
bridge_type=tcp
bridge_port=[通讯端口]
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=[通讯密钥]

#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
#log_path=nps.log

#Whether to restrict IP access, true or false or ignore
#ip_limit=true

# P2P穿透
p2p_ip=[IP或域名]
p2p_port=[P2P端口]

#web
web_host=[服务端IP或域名]
web_username=[管理员账号]
web_password=[管理员密码]
web_port = [管理端口]
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

客户端

2.对于windows,使用管理员身份运行cmd
注册:npc.exe install 其他参数(例如-server=xx -vkey=xx或者-config=xxx)
启动:npc.exe start
停止:npc.exe stop
如果需要更换命令内容需要先卸载npc.exe uninstall,再重新注册

注册到服务后,日志文件windows位于当前目录下,linux和darwin位于/var/log/npc.log

上一篇下一篇

猜你喜欢

热点阅读