mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-16 06:01:21 +08:00
33a6579a3a
* 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
26 lines
390 B
Go
26 lines
390 B
Go
package obfs
|
|
|
|
type plain struct{}
|
|
|
|
func init() {
|
|
register("plain", newPlain)
|
|
}
|
|
|
|
func newPlain(b *Base) Obfs {
|
|
return &plain{}
|
|
}
|
|
|
|
func (p *plain) initForConn() Obfs { return &plain{} }
|
|
|
|
func (p *plain) GetObfsOverhead() int {
|
|
return 0
|
|
}
|
|
|
|
func (p *plain) Encode(b []byte) ([]byte, error) {
|
|
return b, nil
|
|
}
|
|
|
|
func (p *plain) Decode(b []byte) ([]byte, bool, error) {
|
|
return b, false, nil
|
|
}
|