feat(shadowsocks): implement support for SIP022 AEAD-2022 ciphers

This commit is contained in:
Chang lue Tsen
2025-05-31 11:28:06 -04:00
parent 1a21984c27
commit 0fb0aac2fa
10 changed files with 85 additions and 28 deletions
+6
View File
@@ -2,6 +2,7 @@ package clash
import (
"fmt"
"strings"
"github.com/perfect-panel/server/pkg/adapter/proxy"
)
@@ -21,6 +22,11 @@ func parseShadowsocks(s proxy.Proxy, uuid string) (*Proxy, error) {
UDP: true,
}
if strings.Contains(p.Cipher, "2022") {
serverKey, userKey := proxy.GenerateShadowsocks2022Password(config, uuid)
p.Password = fmt.Sprintf("%s:%s", serverKey, userKey)
}
return p, nil
}
+3 -1
View File
@@ -1,6 +1,8 @@
package clash
import "github.com/perfect-panel/server/pkg/adapter/proxy"
import (
"github.com/perfect-panel/server/pkg/adapter/proxy"
)
func clashTransport(c *Proxy, transportType string, transportConfig proxy.TransportConfig) {