(conn net.Conn, secret string)
| 27 | var STOP_FORWARDING string |
| 28 | |
| 29 | func achieveUUID(conn net.Conn, secret string) (uuid string) { |
| 30 | rMessage := protocol.PrepareAndDecideWhichRProtoFromUpper(conn, secret, protocol.TEMP_UUID) |
| 31 | fHeader, fMessage, err := protocol.DestructMessage(rMessage) |
| 32 | |
| 33 | if err != nil { |
| 34 | conn.Close() |
| 35 | log.Fatalf("[*] Fail to achieve UUID, Error: %s", err.Error()) |
| 36 | } |
| 37 | |
| 38 | if fHeader.MessageType == protocol.UUID { |
| 39 | mmess := fMessage.(*protocol.UUIDMess) |
| 40 | uuid = mmess.UUID |
| 41 | } |
| 42 | |
| 43 | return uuid |
| 44 | } |
| 45 | |
| 46 | func NormalActive(userOptions *Options, proxy share.Proxy) (net.Conn, string) { |
| 47 | var sMessage, rMessage protocol.Message |
no test coverage detected