Skip to content

Commit

Permalink
fix smux compatiblity with trojan-r
Browse files Browse the repository at this point in the history
  • Loading branch information
p4gefau1t committed Apr 1, 2021
1 parent 3f0f42d commit 9bdfc8a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tunnel/trojan/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,14 @@ func (s *Server) acceptLoop() {
rewindConn.StopBuffering()
switch inboundConn.metadata.Command {
case Connect:
s.connChan <- inboundConn
log.Debug("normal trojan connection")
if inboundConn.metadata.DomainName == "MUX_CONN" {
s.muxChan <- inboundConn
log.Debug("mux(r) connection")
} else {
s.connChan <- inboundConn
log.Debug("normal trojan connection")
}

case Associate:
s.packetChan <- &PacketConn{
Conn: inboundConn,
Expand Down

0 comments on commit 9bdfc8a

Please sign in to comment.