github.com/metacubex/mihomo@v1.18.5/transport/hysteria/obfs/dummy.go (about)

     1  package obfs
     2  
     3  type DummyObfuscator struct{}
     4  
     5  func NewDummyObfuscator() *DummyObfuscator {
     6  	return &DummyObfuscator{}
     7  }
     8  
     9  func (x *DummyObfuscator) Deobfuscate(in []byte, out []byte) int {
    10  	if len(out) < len(in) {
    11  		return 0
    12  	}
    13  	return copy(out, in)
    14  }
    15  
    16  func (x *DummyObfuscator) Obfuscate(in []byte, out []byte) int {
    17  	return copy(out, in)
    18  }