mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
format using go-1.19
This commit is contained in:
parent
9ce1de4eee
commit
5ef5142bb0
11 changed files with 34 additions and 27 deletions
|
@ -42,7 +42,7 @@ additional HTTP listener on port 80 to work with ACME.
|
|||
flag.PrintDefaults()
|
||||
}
|
||||
|
||||
//proxy copies data bidirectionally from one connection to another.
|
||||
// proxy copies data bidirectionally from one connection to another.
|
||||
func proxy(local *net.TCPConn, conn net.Conn) {
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(2)
|
||||
|
@ -67,7 +67,7 @@ func proxy(local *net.TCPConn, conn net.Conn) {
|
|||
wg.Wait()
|
||||
}
|
||||
|
||||
//handleConn bidirectionally connects a client snowflake connection with an ORPort.
|
||||
// handleConn bidirectionally connects a client snowflake connection with an ORPort.
|
||||
func handleConn(conn net.Conn) error {
|
||||
addr := conn.RemoteAddr().String()
|
||||
statsChannel <- addr != ""
|
||||
|
@ -80,7 +80,7 @@ func handleConn(conn net.Conn) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
//acceptLoop accepts incoming client snowflake connection and passes them to a handler function.
|
||||
// acceptLoop accepts incoming client snowflake connection and passes them to a handler function.
|
||||
func acceptLoop(ln net.Listener) {
|
||||
for {
|
||||
conn, err := ln.Accept()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue