12 月 232021
 

最近由于家里用是移动宽带,一直没有外网IP,映射都是通过frp和公司的阿里云安装nps使用的,最近腾讯云正好做活动,74元主机用1年,好像加上移动宽带的钱,也比电信的钱少很多,唯一的到时候可能还要买个移动套餐。

后来考虑了下,就冲动的买了3年的轻量级应用服务。才用了222元,主要是做内网穿透用的,可惜没有香港的服务器,否则可以买个翻墙。

nps使用一段时间时间了,参考的文档主要有如下:

https://ehang-io.github.io/nps/#/?id=nps  使用文档

https://hub.docker.com/r/ffdfgdfg/nps  docker 的 nps使用

https://hub.docker.com/r/ffdfgdfg/npc docker 的 npc使用

其实配合docker使用起来非常爽,主要客户端安装个docker,穿透的端口和内网的映射随便你设定。
而且很神奇的发现,P2P穿透居然在腾讯云的主机是可以用的,阿里云主机不能用。这样的话,通过openvpn去P2P连自己家里的机器,流量不需要经过nps服务器,同时网速不受限制,贼好。

P2P配置的文档:

https://www.chiphell.com/thread-2312172-1-1.html

主要就是:

①【必须】p2p_ip=121.281.131.127 (<—-你VPS或者独服的公网IP地址,记住不要填写域名)
                p2p_port=6000 (<—–任意端口,官方默认6000,但是防火墙一定要放行6000-6002,IP段,而不是只放行6000,以此类推,假如你改成7000端口,那么放行7000-7002,很多人穿透失败就是这一步没做)

这个在配置文件里面有,而且是udp协议,当然不是所有的服务器都行,我当时测试阿里云就不行。

域名解析配置:

也需要更改配置文件修改:

#HTTP(S) proxy port, no startup if empty
#http_proxy_ip=0.0.0.0
#http_proxy_port=80
#https_proxy_port=443
#https_just_proxy=true
#default https certificate setting
#https_default_cert_file=conf/server.pem
#https_default_key_file=conf/server.key

 

但是由于腾讯云的管控非常严格,80 和 443端口都要备案,否则无法使用,暂时放弃了,后续有需要只能通过https协议的其他端口,譬如444端口对外服务。测试下来。无备案啥都干不了。备案还得买域名,tk域名还不能备案,真的很烦。

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny