0x01 前言
0x02 简介
支持多种协议,兼容几乎所有常用协议,例如tcp,udp,http(s),socks5,p2p,http代理… 全面的平台兼容性(Linux,Windows,MacOS,Synology等),仅支持将安装作为系统服务进行。 全面控制,允许客户端和服务器控制。 Https集成,支持将后端代理和Web服务转换为https,并支持多个证书。 只需在Web ui上进行简单配置即可完成大多数要求。 完整的信息显示,例如流量,系统信息,实时带宽,客户端版本等。 强大的扩展功能,一切可用(缓存,压缩,加密,流量限制,带宽限制,端口重用等) 域名解析具有诸如自定义标题,404页面配置,主机修改,站点保护,URL路由和全景解析之类的功能。 服务器上的多用户和用户注册支持。
0x03 实验环境
环境模拟1-客户端配置文件模式

服务端部署

linux_amd64_server/ - conf ##配置文件目录 - web ##web文件目录 - nps ##nps运行文件
appname = nps #Boot mode(dev|pro) #启动模式 runmode = dev #HTTP(S) proxy port, no startup if empty #HTTP(S)代理端口,如果为空则不启动 http_proxy_ip=0.0.0.0 http_proxy_port=8081 #http监听端口,默认80 https_proxy_port=443 https_just_proxy=true #default https certificate setting #默认HTTPS证书设置 https_default_cert_file=conf/server.pem https_default_key_file=conf/server.key ##bridge ##桥接 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 #log_path=nps.log #Whether to restrict IP access, true or false or ignore #是否限制IP访问,true、false或ignore #ip_limit=true #p2p代理 #p2p_ip=127.0.0.1 #p2p_port=6000 #web web_host= ##web管理端登录地址URL web_username=admin ##web管理端登录名 web_password=123 ##web管理端登录密码(注:正式环境建议更改) web_port = 8080 ##web管理端访问端口 web_ip=0.0.0.0 ##web管理端登录地址默认0.0.0.0不需要修改 web_base_url= ##管理端web路径,默认不需要指定 web_open_ssl=false #管理端是否开启ssl 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 #Web管理多用户登录 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



2.客户端部署

- conf #客户端配置文件夹 - npc.exe #客户端运行程序
3.客户端详细配置
[common] server_addr=1.1.1.1:8024 ## 服务端vps ip/域名:port conn_type=tcp ## 通信模式与服务端配置bridge中bridge_type=tcp设为一致 vkey=w4c7qokkqsfqzxeg ## 端配置文件中的服务密钥,手动指定 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 [tcp] mode=tcp target_addr=192.168.138.135:3389 ##内网服务地址 ip:port server_port=43389 ##映射到vps端口

4.建立连接









环境模拟2-客户端无配置文件模式

1.服务端部署



./npc -server=81.0.0.0:8024 -vkey=qwertasdfg -type=tcp ##linux npc.exe -server=81.0.0.0:8024 -vkey=qwertasdfg -type=tcp ##windows
2.客户端部署

tar -zxvf linux_amd64_client.tar.gz
3.建立连接
./npc -server=81.0.0.0:8024 -vkey=qwertasdfg -type=tcp





