Giter VIP home page Giter VIP logo

Comments (5)

finalwhy avatar finalwhy commented on May 17, 2024 1

加1,我的trojan-go也是这种情况

from trojan-go.

p4gefau1t avatar p4gefau1t commented on May 17, 2024 1

Listen同时接受IPv4和IPv6的TCP连接, 这是Linux的默认行为,和trojan-go无关。尚且trojan-go做的,也仅仅是把配置文件中的地址交给go网络库处理而已。参考这里:

https://stackoverflow.com/questions/20657650/socket-listener-for-ipv6-and-ipv4

nodejs/node#9390

如果你需要像nginx那样严格地开启两个socket分别监听IPv4和IPv6的所有入站(0.0.0.0和::),可以修改源码,为socket添加IPV6_V6ONLY选项。

from trojan-go.

teddysun avatar teddysun commented on May 17, 2024

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.

digits122 avatar digits122 commented on May 17, 2024

我这里使用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.

pifeifei avatar pifeifei commented on May 17, 2024

image

我 httpd 显示只绑定 ipv6 端口, 但是 192.168.0.73:88 也是可以访问的,lnmp 环境

from trojan-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.