github.com/Asutorufa/yuhaiin@v0.3.6-0.20240502055049-7984da7023a0/pkg/net/proxy/shadowsocksr/obfs/http_post.go (about) 1 package obfs 2 3 import ( 4 "math/rand/v2" 5 "net" 6 ) 7 8 // newHttpPost create a http_post object 9 func newHttpPost(con net.Conn, info Obfs) net.Conn { 10 // newHttpSimple create a http_simple object 11 12 t := &httpSimplePost{ 13 userAgentIndex: rand.IntN(len(requestUserAgent)), 14 methodGet: false, 15 Conn: con, 16 Obfs: info, 17 } 18 return t 19 }