feat(shadowsocks): implement support for SIP022 AEAD-2022 ciphers
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user