Feature: add ssr support (#805)

* Refactor ssr stream cipher to expose iv and key

References:
https://github.com/Dreamacro/go-shadowsocks2
https://github.com/sh4d0wfiend/go-shadowsocksr2

* Implement ssr obfs

Reference:
https://github.com/mzz2017/shadowsocksR

* Implement ssr protocol

References:
https://github.com/mzz2017/shadowsocksR
https://github.com/shadowsocksRb/shadowsocksr-libev
https://github.com/shadowsocksr-backup/shadowsocksr
This commit is contained in:
goomadao
2020-07-22 23:02:15 +08:00
committed by GitHub
parent b4221d4b74
commit 33a6579a3a
24 changed files with 2394 additions and 3 deletions

View File

@ -0,0 +1,22 @@
package protocol
import (
"bytes"
"github.com/Dreamacro/clash/component/ssr/tools"
)
func init() {
register("auth_aes128_sha1", newAuthAES128SHA1)
}
func newAuthAES128SHA1(b *Base) Protocol {
return &authAES128{
Base: b,
recvInfo: &recvInfo{buffer: new(bytes.Buffer)},
authData: &authData{},
salt: "auth_aes128_sha1",
hmac: tools.HmacSHA1,
hashDigest: tools.SHA1Sum,
}
}