├── conf
├── tasks.json
├── multi_account.conf
├── clients.json
├── server.pem
├── npc.conf
├── server.key
├── nps.conf
└── hosts.json
├── docs
├── .nojekyll
├── logo.png
├── discuss.md
├── windows_client_service_configuration.png
├── contribute.md
├── introduction.md
├── thanks.md
├── donate.md
├── _navbar.md
├── _coverpage.md
├── install.md
├── faq.md
├── npc_sdk.md
├── _sidebar.md
├── description.md
├── npc_extend.md
├── server_config.md
├── README.md
├── api.md
├── nps_use.md
├── run.md
├── index.html
├── bt.md
├── logo.svg
├── nps_extend.md
├── example.md
├── webapi.md
├── use.md
└── feature.md
├── .gitignore
├── image
├── cpu1.png
├── cpu2.png
├── http.png
├── qps.png
├── sock5.png
├── speed.png
├── tcp.png
├── udp.png
├── web.png
├── web2.png
├── bt
│ ├── bt1.jpg
│ ├── bt2.png
│ ├── bt3.png
│ └── bt_1.png
├── httpProxy.png
├── new
│ ├── https.png
│ ├── payCode.png
│ └── tcp_limit.png
├── donation_wx.png
└── donation_zfb.png
├── web
├── static
│ ├── img
│ │ └── flag
│ │ │ ├── en-US.png
│ │ │ └── zh-CN.png
│ ├── webfonts
│ │ ├── fa-solid-900.eot
│ │ ├── fa-solid-900.ttf
│ │ ├── fa-solid-900.woff
│ │ └── fa-solid-900.woff2
│ ├── page
│ │ └── error.html
│ └── css
│ │ ├── solid.min.css
│ │ └── regular.min.css
├── views
│ ├── public
│ │ └── error.html
│ ├── global
│ │ └── index.html
│ ├── login
│ │ ├── register.html
│ │ └── index.html
│ └── index
│ │ └── help.html
├── controllers
│ ├── auth.go
│ ├── global.go
│ ├── client.go
│ └── login.go
└── routers
│ └── router.go
├── .gitattributes
├── lib
├── version
│ └── version.go
├── daemon
│ ├── reload.go
│ └── daemon.go
├── sheap
│ └── heap.go
├── common
│ ├── pprof.go
│ ├── logs.go
│ ├── const.go
│ ├── pool.go
│ ├── run.go
│ └── netpackager.go
├── rate
│ ├── conn.go
│ └── rate.go
├── nps_mux
│ ├── sysGetsock_nowindows.go
│ ├── sysGetsock_windows.go
│ ├── map.go
│ ├── pool.go
│ ├── rate.go
│ └── netpackager.go
├── pmux
│ ├── pmux_test.go
│ ├── plistener.go
│ ├── pconn.go
│ └── pmux.go
├── conn
│ ├── snappy.go
│ ├── listener.go
│ └── link.go
├── file
│ ├── sort.go
│ └── obj.go
├── config
│ └── config_test.go
├── crypt
│ ├── crypt.go
│ └── tls.go
├── cache
│ └── lru.go
└── goroutine
│ └── pool.go
├── server
├── proxy
│ ├── transport_windows.go
│ ├── transport.go
│ ├── p2p.go
│ ├── udp.go
│ ├── tcp.go
│ └── base.go
├── connection
│ └── connection.go
├── test
│ └── test.go
└── tool
│ └── utils.go
├── Dockerfile.npc
├── Dockerfile.nps
├── client
├── register.go
└── health.go
├── .github
├── ISSUE_TEMPLATE
│ ├── feature_request.md
│ └── bug_report.md
└── workflows
│ ├── docker.yml
│ └── pkg.yml
├── gui
└── npc
│ ├── AndroidManifest.xml
│ └── npc.go
├── cmd
└── npc
│ └── sdk.go
├── .travis.yml
├── Makefile
├── README_zh.md
├── go.mod
└── README.md
/conf/tasks.json:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/.nojekyll:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | nps
3 | npc
4 |
--------------------------------------------------------------------------------
/conf/multi_account.conf:
--------------------------------------------------------------------------------
1 | # key -> user | value -> pwd
2 | npc=npc.pwd
--------------------------------------------------------------------------------
/docs/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/docs/logo.png
--------------------------------------------------------------------------------
/image/cpu1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/cpu1.png
--------------------------------------------------------------------------------
/image/cpu2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/cpu2.png
--------------------------------------------------------------------------------
/image/http.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/http.png
--------------------------------------------------------------------------------
/image/qps.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/qps.png
--------------------------------------------------------------------------------
/image/sock5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/sock5.png
--------------------------------------------------------------------------------
/image/speed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/speed.png
--------------------------------------------------------------------------------
/image/tcp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/tcp.png
--------------------------------------------------------------------------------
/image/udp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/udp.png
--------------------------------------------------------------------------------
/image/web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/web.png
--------------------------------------------------------------------------------
/image/web2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/web2.png
--------------------------------------------------------------------------------
/image/bt/bt1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/bt/bt1.jpg
--------------------------------------------------------------------------------
/image/bt/bt2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/bt/bt2.png
--------------------------------------------------------------------------------
/image/bt/bt3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/bt/bt3.png
--------------------------------------------------------------------------------
/image/bt/bt_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/bt/bt_1.png
--------------------------------------------------------------------------------
/docs/discuss.md:
--------------------------------------------------------------------------------
1 | # 交流群
2 |
3 | 
4 |
--------------------------------------------------------------------------------
/image/httpProxy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/httpProxy.png
--------------------------------------------------------------------------------
/image/new/https.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/new/https.png
--------------------------------------------------------------------------------
/image/donation_wx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/donation_wx.png
--------------------------------------------------------------------------------
/image/donation_zfb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/donation_zfb.png
--------------------------------------------------------------------------------
/image/new/payCode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/new/payCode.png
--------------------------------------------------------------------------------
/image/new/tcp_limit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/image/new/tcp_limit.png
--------------------------------------------------------------------------------
/web/static/img/flag/en-US.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/web/static/img/flag/en-US.png
--------------------------------------------------------------------------------
/web/static/img/flag/zh-CN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/web/static/img/flag/zh-CN.png
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.js linguist-language=golang
2 | *.css linguist-language=golang
3 | *.html linguist-language=golang
4 |
--------------------------------------------------------------------------------
/web/static/webfonts/fa-solid-900.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/web/static/webfonts/fa-solid-900.eot
--------------------------------------------------------------------------------
/web/static/webfonts/fa-solid-900.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/web/static/webfonts/fa-solid-900.ttf
--------------------------------------------------------------------------------
/web/static/webfonts/fa-solid-900.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/web/static/webfonts/fa-solid-900.woff
--------------------------------------------------------------------------------
/web/static/webfonts/fa-solid-900.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/web/static/webfonts/fa-solid-900.woff2
--------------------------------------------------------------------------------
/docs/windows_client_service_configuration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpaqueGlass/fork-nps/master/docs/windows_client_service_configuration.png
--------------------------------------------------------------------------------
/docs/contribute.md:
--------------------------------------------------------------------------------
1 | # 贡献
2 |
3 | - 如果遇到bug可以直接提交至dev分支
4 | - 使用遇到问题可以通过issues反馈
5 | - 项目处于开发阶段,还有很多待完善的地方,如果可以贡献代码,请提交 PR 至 dev 分支
6 | - 如果有新的功能特性反馈,可以通过issues或者qq群反馈
7 |
--------------------------------------------------------------------------------
/docs/introduction.md:
--------------------------------------------------------------------------------
1 | 
2 | # 介绍
3 |
4 | 可在网页上配置和管理各个tcp、udp隧道、内网站点代理,http、https解析等,功能强大,操作方便。
5 |
--------------------------------------------------------------------------------
/lib/version/version.go:
--------------------------------------------------------------------------------
1 | package version
2 |
3 | const VERSION = "0.26.20"
4 |
5 | // Compulsory minimum version, Minimum downward compatibility to this version
6 | func GetVersion() string {
7 | return "0.26.0"
8 | }
9 |
--------------------------------------------------------------------------------
/server/proxy/transport_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package proxy
4 |
5 | import (
6 | "ehang.io/nps/lib/conn"
7 | )
8 |
9 | func HandleTrans(c *conn.Conn, s *TunnelModeServer) error {
10 | return nil
11 | }
12 |
--------------------------------------------------------------------------------
/docs/thanks.md:
--------------------------------------------------------------------------------
1 | Thanks [jetbrains](https://www.jetbrains.com/?from=nps) for providing development tools for nps
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/web/static/page/error.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
19 | 适用范围: 小程序开发、微信公众号开发、产品演示 20 |
21 |22 | 假设场景: 23 |
使用步骤:
28 |
33 | ./npc -server={{.ip}}:{{.p}} -vkey=客户端的密钥
34 | 注:上文中提到公网ip({{.ip}})为系统自动识别,如果是在测试环境中请自行对应,如需使用https请在配置文件中将https端口设置为443,和将对应的证书文件路径添加到配置文件中 38 |
39 |47 | 适用范围: ssh、远程桌面等tcp连接场景 48 |
49 |50 | 假设场景: 想通过访问公网服务器{{.ip}}的8001端口,连接内网机器10.1.50.101的22端口,实现ssh连接 51 |
52 |使用步骤:
53 |
56 | ./npc -server={{.ip}}:{{.p}} -vkey=客户端的密钥
57 |
58 | 注:上文中提到公网ip({{.ip}})为系统自动识别,如果是在测试环境中请自行对应,默认内网客户端已经启动
63 |69 | 适用范围: 内网dns解析等udp连接场景 70 |
71 |72 | 假设场景: 内网有一台dns(10.1.50.102:53),在非内网环境下想使用该dns,公网服务器为{{.ip}} 73 |
74 |使用步骤:
75 |
78 | ./npc -server={{.ip}}:{{.p}} -vkey=客户端的密钥
79 |
80 | 注:上文中提到公网ip({{.ip}})为系统自动识别,如果是在测试环境中请自行对应,默认内网客户端已经启动
85 |93 | 适用范围: 在外网环境下如同使用vpn一样访问内网设备或者资源 94 |
95 |96 | 假设场景: 想将公网服务器{{.ip}}的8003端口作为socks5代理,达到访问内网任意设备或者资源的效果 97 |
98 |使用步骤:
99 |
102 | ./npc -server={{.ip}}:{{.p}} -vkey=客户端的密钥
103 |
104 | 注:上文中提到公网ip({{.ip}})为系统自动识别,如果是在测试环境中请自行对应,默认内网客户端已经启动
109 |115 | 适用范围: 在外网环境下访问内网站点 116 |
117 |118 | 假设场景: 想将公网服务器{{.ip}}的8004端口作为http代理,访问内网网站 119 |
120 |使用步骤:
121 |
124 | ./npc -server={{.ip}}:{{.p}} -vkey=客户端的密钥
125 |
126 | 注:上文中提到公网ip({{.ip}})为系统自动识别,如果是在测试环境中请自行对应,默认内网客户端已经启动
131 |单个客户端可以添加多条隧道或者域名解析
136 |