commit b90d02fcaad915c95a8723d5c0089e79a793c2d2 Author: David Fifield david@bamsoftware.com Date: Mon Dec 16 16:29:33 2013 -0800
Set TOR_PT_SERVER_TRANSPORT_OPTIONS. --- obfs-flash-server.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/obfs-flash-server.go b/obfs-flash-server.go index f6cc7af..d186df7 100644 --- a/obfs-flash-server.go +++ b/obfs-flash-server.go @@ -178,6 +178,7 @@ func encodeServerTransportOptions(methodName string, opts pt.Args) string { type ServerTransportPlugin struct { MethodName string Command []string + Options pt.Args }
func startProcesses(connectBackAddr net.Addr, plugins []ServerTransportPlugin) (bindAddr *net.TCPAddr, procs ProcList, err error) { @@ -202,6 +203,7 @@ func startProcesses(connectBackAddr net.Addr, plugins []ServerTransportPlugin) ( "TOR_PT_EXTENDED_SERVER_PORT=", "TOR_PT_ORPORT=" + bindAddr.String(), "TOR_PT_SERVER_TRANSPORTS=" + plugin.MethodName, + "TOR_PT_SERVER_TRANSPORT_OPTIONS=" + encodeServerTransportOptions(plugin.MethodName, plugin.Options), "TOR_PT_SERVER_BINDADDR=" + plugin.MethodName + "-127.0.0.1:0", } log("%s environment %q", cmd.Args[0], cmd.Env) @@ -426,7 +428,8 @@ func (conf *Configuration) PluginList(methodName string) ([]ServerTransportPlugi if !ok { return nil, errors.New(fmt.Sprintf("no transport named %q", name)) } - stp = append(stp, ServerTransportPlugin{name, command}) + options := conf.Options[name] + stp = append(stp, ServerTransportPlugin{name, command, options}) } return stp, nil }
tor-commits@lists.torproject.org