mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-16 06:01:21 +08:00
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
|
||
|
}
|