Fix: wechat protocol is not working if no obfs string is configured
This commit is contained in:
18
transport/hysteria/obfs/dummy.go
Normal file
18
transport/hysteria/obfs/dummy.go
Normal file
@ -0,0 +1,18 @@
|
||||
package obfs
|
||||
|
||||
type DummyObfuscator struct{}
|
||||
|
||||
func NewDummyObfuscator() *DummyObfuscator {
|
||||
return &DummyObfuscator{}
|
||||
}
|
||||
|
||||
func (x *DummyObfuscator) Deobfuscate(in []byte, out []byte) int {
|
||||
if len(out) < len(in) {
|
||||
return 0
|
||||
}
|
||||
return copy(out, in)
|
||||
}
|
||||
|
||||
func (x *DummyObfuscator) Obfuscate(in []byte, out []byte) int {
|
||||
return copy(out, in)
|
||||
}
|
Reference in New Issue
Block a user