yisier / nps

基于NPS 0.29.10 版本二开而来,NPS接力项目。公益云NPS:https://natnps.com
GNU General Public License v3.0
2.02k stars 256 forks source link

命令:nps start和nps的问题 #29

Closed SmallBambooCode closed 1 year ago

SmallBambooCode commented 1 year ago

不知道哪里出现的问题 当我直接试用nps start的时候,一切正常(web后台和内网穿透均正常) 但是我试用nps命令启动的时候,web后台正常,但是内网穿透有问题 这是截图: https://s1.ax1x.com/2022/11/22/z1G64x.png

以下是我的配置文件

appname = nps
#Boot mode(dev|pro)
runmode = pro

##bridge
# 底层通信协议,默认tcp,可选用kcp
bridge_type=tcp
# 底层通信端口,默认8024,如已被占用请指定其他端口
bridge_port=7000
bridge_ip=0.0.0.0

# 当客户端以配置文件模式启动时会用到的验证密钥,可自行设置,本教程不会使用到
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=6
log_path=nps.log

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

#p2p
#p2p_ip=127.0.0.1
#p2p_port=6000

#web
web_host=nps.xxx*****.cn
web_username=*8*****
web_password=**********5
web_port = 8001
web_ip=0.0.0.0
web_base_url=
web_open_ssl=true
web_cert_file=/root/conf/server.pem
web_key_file=/root/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=true
#带宽限制
allow_rate_limit=true
#客户端最大隧道数限制
allow_tunnel_num_limit=true
allow_local_proxy=false
#客户端最大连接数
allow_connection_num_limit=true
#每个隧道监听不同的服务端端口
allow_multi_ip=true
system_info_display=true

#获取用户真实ip
http_add_origin_header=true

#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

#管理面板开启验证码校验
open_captcha=true
yisier commented 1 year ago

nps start 启动时读取的配置文件目录是 /etc/nps 直接运行 nps 默认读取当前目录下的配置文件