Comments (5)
加1,我的trojan-go也是这种情况
from trojan-go.
Listen同时接受IPv4和IPv6的TCP连接, 这是Linux的默认行为,和trojan-go无关。尚且trojan-go做的,也仅仅是把配置文件中的地址交给go网络库处理而已。参考这里:
https://stackoverflow.com/questions/20657650/socket-listener-for-ipv6-and-ipv4
如果你需要像nginx那样严格地开启两个socket分别监听IPv4和IPv6的所有入站(0.0.0.0和::),可以修改源码,为socket添加IPV6_V6ONLY选项。
from trojan-go.
root 用户输入命令 netstat -nxtlp
查看端口占用情况。
通常情况下 :::443 是 ipv6 和 ipv4 都可以被访问到的。如下所示:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp6 0 0 :::443 :::* LISTEN 1376/trojan-go
from trojan-go.
我这里使用netstat -tnlp,返回一些端口监听,输出如下
[root@mail ~]# netstat -tnlpx
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 1392/dovecot
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 1392/dovecot
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 1392/dovecot
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 11076/nginx: master
tcp 0 0 127.0.0.1:82 0.0.0.0:* LISTEN 11076/nginx: master
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 808/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1269/master
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 1392/dovecot
tcp6 0 0 :::995 :::* LISTEN 1392/dovecot
tcp6 0 0 :::110 :::* LISTEN 1392/dovecot
tcp6 0 0 :::143 :::* LISTEN 1392/dovecot
tcp6 0 0 :::80 :::* LISTEN 11076/nginx: master
tcp6 0 0 :::22 :::* LISTEN 808/sshd
tcp6 0 0 :::443 :::* LISTEN 14127/trojan-go
tcp6 0 0 :::993 :::* LISTEN 1392/dovecot
例如nginx程序绑定ipv4会有一条 tcp 0.0.0.0:80的输出,绑定ipv6的会有一条:::80的输出,这两个输出有分别显示,二sshd,dovecot,也都是类似。而这里trojan-go只在tcp6这里有一条绑定,我认为3个冒号是仅仅ipv6的,如果是既绑定了ipv4,又绑定了ipv6,为什么trojan-go不会像nginx一样,显示出两条绑定内容而只显示了一条?
from trojan-go.
我 httpd 显示只绑定 ipv6 端口, 但是 192.168.0.73:88 也是可以访问的,lnmp 环境
from trojan-go.
Related Issues (20)
- [BUG]无法通过ipv6建立连接 HOT 9
- [BUG] exe file HOT 1
- how to rejoin the telegram group HOT 4
- [BUG] HOT 1
- how to using WARP proxy for outbound like xray core? HOT 3
- 可以内置一个简单的http server吗? HOT 1
- 华为手机没法用,只能装别的了
- [BUG] 新出了个检测:https://github.com/XTLS/Trojan-killer,会被识别否? HOT 2
- [BUG]使用自签名证书启动服务端失败 HOT 2
- [BUG] 我使用了clash链接trojan-go,全局模式,无法链接到google HOT 7
- [BUG] tls handshake failed | EOF
- [BUG]windows exe闪退 HOT 3
- [BUG]tls handshake failed | EOF
- 翻墙用户到查20年, 影响三代! HOT 6
- [Feature] 是否可以考虑API 可以直接通过Http协议restful能够直接进行操作访问?
- 电报可以拉我一下么 HOT 1
- 无法在国内链接ChatGPT,会被识别来源的ip HOT 5
- 构建失败 unknown revision 476fab902fbe HOT 13
- [BUG] Trojan-go Use IPv6 for DNS on a Server with IPv6 Disabled
- 服务器已经有 nginx 了,可以不配置 https 部署吗 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trojan-go.