feat: support http and socks5 upstream node uris

This commit is contained in:
XHB
2026-03-14 03:41:46 +08:00
parent fee58d1cf6
commit 6cbb3a7b15
8 changed files with 208 additions and 35 deletions
+1 -12
View File
@@ -651,24 +651,13 @@ func parseNodesFromContent(content string) ([]config.NodeConfig, error) {
if line == "" || strings.HasPrefix(line, "#") {
continue
}
if isProxyURI(line) {
if config.IsProxyURI(line) {
nodes = append(nodes, config.NodeConfig{URI: line})
}
}
return nodes, nil
}
func isProxyURI(s string) bool {
schemes := []string{"vmess://", "vless://", "trojan://", "ss://", "ssr://", "hysteria://", "hysteria2://", "hy2://", "anytls://"}
lower := strings.ToLower(s)
for _, scheme := range schemes {
if strings.HasPrefix(lower, scheme) {
return true
}
}
return false
}
type defaultLogger struct{}
func (defaultLogger) Infof(format string, args ...any) {