NPS 内网穿透

nps下载地址:nps

路由器版本下载这个:linux_mipsle_client.tar.gz

在这里插入图片描述
根据版本下载即可
我这里是一台win的公网服务器下载的是 windows_amd64_server.tar.gz 服务端
需要内网穿透的本地电脑也是win 下载的是 windows_amd64_client.tar.gz 客户端

1 windows_amd64_server.tar.gz 服务端 解压

打开nps.conf

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=1180
https_proxy_port=11443
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=18024
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
#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=xxx.xxx.xxx
web_username=yjx
web_password=yjx
web_port = 18080
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

打开nps的web端创建一个客户端

web_host=xxx.xxx.xxx
web_username=yjx
web_password=yjx
web_port = 18080

url: xxx.xxx.xxx:18080
账号密码就是nps.conf里面的 web_username web_password

在这里插入图片描述
拿到创建生成的 唯一验证密钥 pbn4n48gat6bxxx 复制到客户端的vkey字段

本地启动nps客户端

windows_amd64_client.tar.gz 客户端

修改客户端的nps.conf

[common]
server_addr=xxx.xxx.xxx:18024
conn_type=tcp
vkey=pbn4n48gat6bxxx
auto_reconnection=true
max_conn=1000
flow_limit=1000
rate_limit=1000
basic_username=11
basic_password=3
web_username=user
web_password=1234
crypt=true
compress=true
#pprof_addr=0.0.0.0:9999
disconnect_timeout=60

[web]
host=kuboard.yjx-show.top
target_addr=127.0.0.1:30080

[tcpRedis]
mode=tcp
target_addr=127.0.0.1:6379
server_port=10000

#[socks5]
#mode=socks5
#server_port=19009
#multi_account=multi_account.conf

#[file]
#mode=file
#server_port=19008
#local_path=/Users/liuhe/Downloads
#strip_pre=/web/

#[http]
#mode=httpProxy
#server_port=19004

#[udp]
#mode=udp
#server_port=12253
#target_addr=114.114.114.114:53

#[ssh_secret]
#mode=secret
#password=ssh2
#target_addr=123.206.77.88:22

#[ssh_p2p]
#mode=p2p
#password=ssh3

#[secret_ssh]
#local_port=2001
#password=ssh2

#[p2p_ssh]
#local_port=2002
#password=ssh3
#target_addr=123.206.77.88:22

3 . mac端启动nps的客户端

不知道为何 npc start 无效 直接npc却可以启动在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值