Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否过滤掉trojan节点 #12

Open
o0oo0ooo0 opened this issue Apr 25, 2023 · 3 comments
Open

能否过滤掉trojan节点 #12

o0oo0ooo0 opened this issue Apr 25, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@o0oo0ooo0
Copy link

trojan需要单独安装,而且trojan和v2ray同时运行(好像程序代码里运行trojan服务时不会关闭v2ray)要考虑端口占用的问题,如果能过滤掉trojan节点就不用管这个了

@arkrz
Copy link
Owner

arkrz commented Apr 30, 2023

程序只有在选择 Trojan 节点后才会尝试启动 Trojan 服务。

如果不想启动 Trojan,不要选择 Trojan 节点就可以了。

@o0oo0ooo0
Copy link
Author

o0oo0ooo0 commented Apr 30, 2023

程序只有在选择 Trojan 节点后才会尝试启动 Trojan 服务。

如果不想启动 Trojan,不要选择 Trojan 节点就可以了。

默认显示(ping完后的表格)里面没有协议这栏

func printAsTable(nodes types.Nodes) {
	var tableData []types.TableRow
	for i := range nodes {
		tableData = append(tableData, types.TableRow{
			Index: i,
			Name:  nodes[i].Name,
			Addr:  nodes[i].Addr,
			Port:  parsePort(nodes[i].Port),
			Ping:  nodes[i].Ping})
	}
	table.Output(tableData)
}

而且v2ray似乎已经支持Trojan协议了, 不需要单独的程序. 可以改成全用v2ray处理

"outbounds": [
      {
        "tag": "proxy",
        "protocol": "trojan",
        "settings": {
          "servers": [
            {
              "address": "v2.example.com",
              "method": "chacha20",
              "ota": false,
              "password": "5a4809ae-338f-470c-bc74-b3900afbbc26",
              "port": 443,
              "level": 1,
              "flow": ""
            }
          ]
        }
  	  ...
    ]

这是我在v2ray配置里发现的信息

@arkrz
Copy link
Owner

arkrz commented Apr 30, 2023

好的,我会考虑在节点列表里显示协议信息。

初期 v2ray 没有支持 Trojan,所以我用的本地代理转发。现在来看,v2ray 确实已直接支持 Trojan。有空我来改进这个代理方式。

@arkrz arkrz added the enhancement New feature or request label Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants