用内网透明NPS工具实现内网透明
官方网站介绍
NPS是一种轻量级、高性能、强大的内部网透明代理服务器。 当前支持tcp、udp业务传输,包括哪些tcp、udp上层协议(访问内部网站点、调试本地支付接口、ssh访问、远程桌面、内部网http
服务器端安装
下载
github下载服务端和客户端: npc下载
wget下载
wget 3359 github.com/ehang-io/NPS/releases/download/v0. 26.9/Linux _ amd64 _ server.tar.gz
tar-zxflinux _ amd64 _ server.tar.gz
解压缩后的目录结构
[root@ecs-ad7b nps]# tree
同调
├── conf
() )│ ├── clients.json
() )│ ├── hosts.json
() )│ ├── nps.conf #需要修改的配置
() )│ ├── server.key
() )│ ├── server.pem
()│ └── tasks.json
≠Linux_386_server.tar.gz
NPS
(└──网络
▏──静态
() )│ ├── css
)──Bootstrap.min.CSS
)──Bootstrap-table.min.CSS
)──datatables.CSS
)──fontAwesome.min.CSS
)──Regular.min.CSS
)──Solid.min.CSS
(()──style.CSS
() )│ ├── img
(()--旗帜
──en-us.png
(()──zh-cn.png
() )│ ├── js
)──Bootstrap.min.js
()──bootstrap-table-locale-all.min.js
)──Bootstrap-Table.min.js
──e charts.min.js
)──fontAwesome.min.js
──inspi nia.js
)──jquery-3.4.1.min.js
──language.js
(()──popper.min.js
() )│ ├── page
──error.html
(()──languages.XML
()│ └── webfonts
() )│ ├── fa-solid-900.eot
() )│ ├── fa-solid-900.svg
() )│ ├── fa-solid-900.ttf
() )│ ├── fa-solid-900.woff
()│ └── fa-solid-900.woff2
(└── views
──客户
() )│ ├── add.html
() )│ ├── edit.html
()│ └── list.html
├──索引
() )│ ├── add.html
() )│ ├── edit.html
() )│ ├── hadd.html
() )│ ├── hedit.html
() )│ ├── help.html
() )│ ├── hlist.html
() )│ ├── index.html
()│ └── list.html
├── login
() )│ ├── index.html
()│ └── register.html
(└──公共
├── error.html
(└── layout.html
配置更改配置文件:端口、后台管理帐户和后台管理密码
#http(s )代理端口
http_proxy_ip=0.0.0.0
http_proxy_port=80
https_proxy_port=443
https_just_proxy=true
#bridge
bridge_type=tcp
bridge_port=8024 #缺省客户端连接服务器端的网桥接口,可修改
bridge_ip=0.0.0.0
#公共客户端连接服务器端密钥,可修改
public_vkey=123
#网络后台管理
web_host=a.o.com
web_username=admin #默认用户名,更改
web_password=123 #默认密码,更改
web_port=8080 #默认web端口
web_ip=0.0.0.0
web_base_url=#可配置的web路径示例: web_base_url=/nps
web_open_ssl=false
web_cert_file=conf/server.pem
web_key_file=conf/server.key
#auth_key、web api认证ip密钥、可修改、需要16位!
auth _ crypt _ key=1234567812345678
配置
修改配置文件后,单击,
./nps install
将当前配置文件和web静态文件复制到/etc/nps,然后修改配置文件以直接修改/etc/nps/conf/nps.conf
要开始服务的nps start
后台管理浏览器web管理面板: http://your_ip:8080/
创建客户端添加客户端
运行客户端并在本地下载客户端。 例如,在windows上。
win r运行cmd并进入该目录。 请填写自己解压缩的目录。
NPC.exe-server=IP : port-vkey=xxxxx
这里的ip是你的服务器ip
端口是#bridge在您的nps.conf上配置的网桥端口
-vkey是您的控制面板客户端生成的唯一验证密钥
socks测试
这样就成功了内部网透明。 然后,可以选择“高级”高级设置来设置服务名称。 我设定为test。
要设置规则: