jinwyp / one_click_script

install latest or LTS linux kernel and enable BBR or BBR plus
MIT License
4.64k stars 1.41k forks source link

甲骨文 Ubuntu, 20.04.5, 选则2安装trojan-go脚本后,端口监听失败,无法使用 #226

Closed wangchaoya closed 1 year ago

wangchaoya commented 1 year ago

Describe the bug A clear and concise description of what the bug is. 在提出问题前请先自行排除服务器端问题和升级到最新客户端,同时也请通过搜索确认是否有人提出过相同问题。 无

Steps to reproduce the behavior:

  1. 选择的第2项 安装trojan-go

    Ubuntu, ubuntu, 20.04.5, 20.04, focal, CPU arm64, bash, apt-get, /lib/systemd/system/

ipv4,ipv6都已打开

To Reproduce 复现方法
直接安装

Log Info 日志信息: 请提供安装出错的信息 /* 是否自定义Trojan-go的端口号? 直接回车默认为443, 请输入自定义端口号[1-65535]:4433 输入的端口号 4433 没有被占用, 继续安装...

===== 下载并解压zip文件: trojan-go-linux-armv8.zip --2023-03-23 08:43:08-- https://github.com/p4gefau1t/trojan-go/releases/download/v0.10.6/trojan-go-linux-armv8.zip Resolving github.com (github.com)... 192.30.255.113 Connecting to github.com (github.com)|192.30.255.113|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/248025303/50d416ff-b8a2-40b5-a393-d01f9b6ba3ac?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230323%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230323T004308Z&X-Amz-Expires=300&X-Amz-Signature=bc62cdfec48c79e10843ba9ac86c1ebb781aaf14547f8253d3b0fc5b2c7fe72a&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=248025303&response-content-disposition=attachment%3B%20filename%3Dtrojan-go-linux-armv8.zip&response-content-type=application%2Foctet-stream [following] --2023-03-23 08:43:08-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/248025303/50d416ff-b8a2-40b5-a393-d01f9b6ba3ac?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230323%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230323T004308Z&X-Amz-Expires=300&X-Amz-Signature=bc62cdfec48c79e10843ba9ac86c1ebb781aaf14547f8253d3b0fc5b2c7fe72a&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=248025303&response-content-disposition=attachment%3B%20filename%3Dtrojan-go-linux-armv8.zip&response-content-type=application%2Foctet-stream Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.111.133, 185.199.108.133, ... Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 7495061 (7.1M) [application/octet-stream] Saving to: '/root/temp/trojan-go-linux-armv8.zip'

/root/temp/trojan-g 100%[===================>] 7.15M --.-KB/s in 0.09s

2023-03-23 08:43:09 (83.3 MB/s) - '/root/temp/trojan-go-linux-armv8.zip' saved [7495061/7495061]

Archive: /root/temp/trojan-go-linux-armv8.zip inflating: /root/trojan-go/trojan-go inflating: /root/trojan-go/example/client.json inflating: /root/trojan-go/example/client.yaml inflating: /root/trojan-go/example/server.json inflating: /root/trojan-go/example/server.yaml inflating: /root/trojan-go/example/trojan-go.service inflating: /root/trojan-go/example/trojan-go@.service inflating: /root/trojan-go/geoip-only-cn-private.dat inflating: /root/trojan-go/geoip.dat inflating: /root/trojan-go/geosite.dat Created symlink /etc/systemd/system/multi-user.target.wants/trojan-go.service -> /lib/systemd/system/trojan-go.service.

Trojan-go Version: 0.10.6 安装成功 !

*/

查询端口并没有被监听 root@23-3-22-1101:/home/ubuntu# sudo netstat -tulpn 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:22 0.0.0.0: LISTEN 883/sshd: /usr/sbin tcp 0 0 0.0.0.0:111 0.0.0.0: LISTEN 1/init tcp 0 0 127.0.0.1:62789 0.0.0.0: LISTEN 928/bin/xray-linux- tcp 0 0 127.0.0.53:53 0.0.0.0: LISTEN 761/systemd-resolve tcp6 0 0 :::22 ::: LISTEN 883/sshd: /usr/sbin tcp6 0 0 :::111 ::: LISTEN 1/init tcp6 0 0 :::54321 ::: LISTEN 833/x-ui tcp6 0 0 :::37140 ::: LISTEN 928/bin/xray-linux- udp 0 0 127.0.0.53:53 0.0.0.0: 761/systemd-resolve udp 0 0 10.0.0.142:68 0.0.0.0: 759/systemd-network udp 0 0 0.0.0.0:111 0.0.0.0: 1/init udp 0 0 10.0.0.142:123 0.0.0.0: 882/ntpd udp 0 0 127.0.0.1:123 0.0.0.0: 882/ntpd udp 0 0 0.0.0.0:123 0.0.0.0: 882/ntpd udp6 0 0 :::111 ::: 1/init udp6 0 0 2603:c024:c00a:64ee:123 ::: 882/ntpd udp6 0 0 fe80::17ff:fe00:829:123 ::: 882/ntpd udp6 0 0 ::1:123 ::: 882/ntpd udp6 0 0 :::123 ::: 882/ntpd udp6 0 0 fe80::17ff:fe00:829:546 :::

安装完成nginx 成功,域名的网站是正常打开

但是通过x-ui添加的trojan 端口正常被监听,可以使用,

jinwyp commented 1 year ago

运行一下 systemctl status trojan-go 看看是否正常运行了trojan-go

默认是443 端口

wangchaoya commented 1 year ago

谢谢大佬回复,我看到issue历史记录里面推荐了个arm脚本,就跑了一下,后面用这个脚本也能正常添加端口监听了,好像之前是因为docker没起起来导致的,不知道是不是因为没有自动安装docker,等后面创建新的vps了,再看看是不是这样。

jinwyp commented 1 year ago

谢谢大佬回复,我看到issue历史记录里面推荐了个arm脚本,就跑了一下,后面用这个脚本也能正常添加端口监听了,好像之前是因为docker没起起来导致的,不知道是不是因为没有自动安装docker,等后面创建新的vps了,再看看是不是这样。

我的这个项目脚本是不依赖docker的, 最好用全新的系统安装,