From ff73da3a4cf520929e21c05547a85d506098dacc Mon Sep 17 00:00:00 2001 From: Qi Chai <140308209+QiChaiQiChai@users.noreply.github.com> Date: Mon, 11 Mar 2024 12:20:19 +0800 Subject: [PATCH 1/4] =?UTF-8?q?Update=20proxy=5Fgroup.go=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AF=B9proxies=20group=E4=B8=ADicon=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/proxy_group.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/model/proxy_group.go b/model/proxy_group.go index 71a5e2a..fc49275 100644 --- a/model/proxy_group.go +++ b/model/proxy_group.go @@ -17,6 +17,7 @@ type ProxyGroup struct { Size int `yaml:"-"` DisableUDP bool `yaml:"disable-udp,omitempty"` Strategy string `yaml:"strategy,omitempty"` + Icon string `yaml:"icon,omitempty"` } type SelectProxyGroup struct { @@ -24,6 +25,7 @@ type SelectProxyGroup struct { Type string `yaml:"type,omitempty"` Proxies []string `yaml:"proxies,omitempty"` DisableUDP bool `yaml:"disable-udp,omitempty"` + Icon string `yaml:"icon,omitempty"` } type UrlTestProxyGroup struct { @@ -35,6 +37,7 @@ type UrlTestProxyGroup struct { Tolerance int `yaml:"tolerance,omitempty"` Lazy bool `yaml:"lazy"` DisableUDP bool `yaml:"disable-udp,omitempty"` + Icon string `yaml:"icon,omitempty"` } type LoadBalanceProxyGroup struct { @@ -46,12 +49,14 @@ type LoadBalanceProxyGroup struct { Interval int `yaml:"interval,omitempty"` Lazy bool `yaml:"lazy"` Strategy string `yaml:"strategy,omitempty"` + Icon string `yaml:"icon,omitempty"` } type RelayProxyGroup struct { Name string `yaml:"name,omitempty"` Type string `yaml:"type,omitempty"` Proxies []string `yaml:"proxies,omitempty"` + Icon string `yaml:"icon,omitempty"` } func (p ProxyGroup) MarshalYAML() (interface{}, error) { @@ -62,6 +67,7 @@ func (p ProxyGroup) MarshalYAML() (interface{}, error) { Type: p.Type, Proxies: p.Proxies, DisableUDP: p.DisableUDP, + Icon: p.Icon, }, nil case "url-test", "fallback": return UrlTestProxyGroup{ @@ -73,6 +79,7 @@ func (p ProxyGroup) MarshalYAML() (interface{}, error) { Tolerance: p.Tolerance, Lazy: p.Lazy, DisableUDP: p.DisableUDP, + Icon: p.Icon, }, nil case "load-balance": return LoadBalanceProxyGroup{ @@ -84,18 +91,21 @@ func (p ProxyGroup) MarshalYAML() (interface{}, error) { Interval: p.Interval, Lazy: p.Lazy, Strategy: p.Strategy, + Icon: p.Icon, }, nil case "relay": return RelayProxyGroup{ Name: p.Name, Type: p.Type, Proxies: p.Proxies, + Icon: p.Icon, }, nil default: return SelectProxyGroup{ Name: p.Name, Type: p.Type, Proxies: p.Proxies, + Icon: p.Icon, }, nil } } From e5c3852f0671c9efbe51881e0e96cc538a8f1e49 Mon Sep 17 00:00:00 2001 From: Qi Chai <140308209+QiChaiQiChai@users.noreply.github.com> Date: Mon, 11 Mar 2024 12:24:21 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dhysterica=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=BB=A3=E7=90=86=E9=85=8D=E7=BD=AE=E4=B8=AD=E9=83=A8?= =?UTF-8?q?=E5=88=86=E5=AD=97=E6=AE=B5=E7=9A=84=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/proxy_hysteria.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/model/proxy_hysteria.go b/model/proxy_hysteria.go index 21e1e1e..264fb68 100644 --- a/model/proxy_hysteria.go +++ b/model/proxy_hysteria.go @@ -13,6 +13,7 @@ type Hysteria struct { Down string `yaml:"down"` DownSpeed int `yaml:"down-speed,omitempty"` // compatible with Stash Auth string `yaml:"auth,omitempty"` + AuthStringOLD string `yaml:"auth_str,omitempty"` AuthString string `yaml:"auth-str,omitempty"` Obfs string `yaml:"obfs,omitempty"` SNI string `yaml:"sni,omitempty"` @@ -34,9 +35,13 @@ func ProxyToHysteria(p Proxy) Hysteria { Name: p.Name, Server: p.Server, Port: p.Port, + Ports: p.Ports, + Protocol: p.Protocol, Up: p.Up, Down: p.Down, Auth: p.Auth, + AuthStringOLD p.AuthStringOLD, + AuthString: p.AuthString, Obfs: p.Obfs, SNI: p.Sni, SkipCertVerify: p.SkipCertVerify, From 18b6a8189636d73c628614c1845e0ee5b19eaadc Mon Sep 17 00:00:00 2001 From: Qi Chai <140308209+QiChaiQiChai@users.noreply.github.com> Date: Mon, 11 Mar 2024 12:26:42 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dhysterica=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E9=85=8D=E7=BD=AE=E4=B8=AD=E9=83=A8=E5=88=86=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E7=9A=84=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/proxy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/model/proxy.go b/model/proxy.go index caed364..3ce2658 100644 --- a/model/proxy.go +++ b/model/proxy.go @@ -56,6 +56,9 @@ type Proxy struct { DisableMTUDiscovery bool `yaml:"disable-mtu-discovery,omitempty"` FastOpen bool `yaml:"fast-open,omitempty"` HopInterval int `yaml:"hop-interval,omitempty"` + Ports string `yaml:"ports,omitempty"` + AuthStringOLD string `yaml:"auth_str,omitempty"` + AuthString string `yaml:"auth-str,omitempty"` } func (p Proxy) MarshalYAML() (interface{}, error) { From 68c64ad8672305e76f88649142a654d46486e9e5 Mon Sep 17 00:00:00 2001 From: Qi Chai <140308209+QiChaiQiChai@users.noreply.github.com> Date: Mon, 11 Mar 2024 12:30:16 +0800 Subject: [PATCH 4/4] Update proxy_hysteria.go --- model/proxy_hysteria.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/proxy_hysteria.go b/model/proxy_hysteria.go index 264fb68..06c4a75 100644 --- a/model/proxy_hysteria.go +++ b/model/proxy_hysteria.go @@ -40,7 +40,7 @@ func ProxyToHysteria(p Proxy) Hysteria { Up: p.Up, Down: p.Down, Auth: p.Auth, - AuthStringOLD p.AuthStringOLD, + AuthStringOLD: p.AuthStringOLD, AuthString: p.AuthString, Obfs: p.Obfs, SNI: p.Sni,