c1be3debfd
* 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
25 lines
390 B
Go
25 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
|
|
}
|