Commit graph

18 commits

Author SHA1 Message Date
Arlo Breault
f2abf5b60c Try to protect against crash from dereferencing a NULL in go-proxy
Follow up to ff8f385

Similar to c834c76
2018-03-14 00:15:13 -04:00
Arlo Breault
42ec097a58 Allow broker base url to have a path 2018-03-14 00:04:59 -04:00
David Fifield
44ab82bc61 Add a "starting" log line to proxy-go. 2018-03-13 19:25:41 -07:00
Arlo Breault
ff8f385108 Call explicit frees in proxy-go 2018-03-08 13:46:55 -05:00
Arlo Breault
da8b37e866 Fix go vet complaint
"net.IPAddr composite literal uses unkeyed fields"
2017-10-18 11:34:00 -04:00
Hooman
ae0643320e Pass client IP from proxy-go to server by parsing SDP
Call conn.RemoteAddr() before entering the datachannelHandler goroutine.
This is a workaround for the hang described at
https://bugs.torproject.org/18628#comment:8
2017-10-14 15:06:33 -04:00
David Fifield
3e3e4b8dd9 Deglobalize some flag-controlled variables.
Remove global opt struct.
2017-08-01 15:53:36 -07:00
David Fifield
1eb5c66428 Stop writing to global opt.brokerURL variable.
This variable was being written to by multiple goroutines, overwriting
the Path to either "/proxy" or "/answer" as necessary, which was racy.
2017-08-01 15:51:34 -07:00
David Fifield
461dbeba80 Make capacity a uint.
This prohibits some nonsense like "./proxy-go -capacity -550", which
otherwise results in a panic like:

INFO: configuration.go:174: Created Configuration at  &{[{[stun:stun.l.google.com:19302]  }] All Balanced }
panic: makechan: size out of range
2017-08-01 15:06:53 -07:00
David Fifield
dbe1ef4fa5 Remove unused stunURL and relayURL, unused except for parsing tests. 2017-08-01 10:55:14 -07:00
David Fifield
5440a4ba16 fmt 2017-07-25 18:59:15 -07:00
David Fifield
bfea72b50e Have proxy-go log in UTC. 2017-06-29 16:44:17 -07:00
David Fifield
b0dbf47473 Move some default config into constants at the stop. 2017-06-29 16:11:03 -07:00
David Fifield
c2c1a9d09d Enable proxy-go to create its log file. 2017-06-29 16:09:25 -07:00
David Fifield
faeb8da8c9 Use crypto/rand, not math/rand, to generate session IDs.
math/rand always uses a deterministic seed. The sequence of session IDs
was therefore always the same:
	Uv38ByGCZU8WP18PmmIdcg
	lWbHTRDYaB0NhtHpHgAWeQ
	...

Multiple copies of this program would have had session ID collisions. I
don't know what the consequences of that would be.
2017-06-29 16:00:29 -07:00
David Fifield
af8a026991 Improve some error messages. 2017-06-29 15:59:07 -07:00
David Fifield
c3f87281be Add -log option to proxy-go. 2017-06-29 15:11:14 -07:00
yinghuocho
4b5794c935 Golang implementation of standalone snowflake proxy 2017-04-24 16:16:02 -07:00