mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Include "tls=no" or "tls=yes" in the bridge descriptor.
Might make this controlled by ServerTransportOptions instead of the --disable-tls command line option.
This commit is contained in:
parent
aa204af6b1
commit
d8411816c4
1 changed files with 4 additions and 1 deletions
|
@ -259,16 +259,19 @@ func main() {
|
|||
switch bindaddr.MethodName {
|
||||
case ptMethodName:
|
||||
var ln net.Listener
|
||||
args := pt.Args{}
|
||||
if disableTLS {
|
||||
args.Add("tls", "no")
|
||||
ln, err = startListener("tcp", bindaddr.Addr)
|
||||
} else {
|
||||
args.Add("tls", "yes")
|
||||
ln, err = startListenerTLS("tcp", bindaddr.Addr, certFilename, keyFilename)
|
||||
}
|
||||
if err != nil {
|
||||
pt.SmethodError(bindaddr.MethodName, err.Error())
|
||||
break
|
||||
}
|
||||
pt.Smethod(bindaddr.MethodName, ln.Addr())
|
||||
pt.SmethodArgs(bindaddr.MethodName, ln.Addr(), args)
|
||||
listeners = append(listeners, ln)
|
||||
default:
|
||||
pt.SmethodError(bindaddr.MethodName, "no such method")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue