This is an automated email from the git hooks/post-receive script.
cohosh pushed a change to branch main in repository pluggable-transports/snowflake.
from 2f89fbc Represent fingerprint internally as byte array new d807e9d Move tor-specific code outside of client library new aab8064 Fix gitlab CI to work with multiple client .go files
The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
Summary of changes: .gitlab-ci.yml | 2 +- client/lib/lib_test.go | 5 +++-- client/{lib => }/pt_event_logger.go | 2 +- client/snowflake.go | 2 +- go.mod | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) rename client/{lib => }/pt_event_logger.go (97%)
This is an automated email from the git hooks/post-receive script.
cohosh pushed a commit to branch main in repository pluggable-transports/snowflake.
commit d807e9d370e79ede725e45edf259223820bb7dc9 Author: Cecylia Bocovich cohosh@torproject.org AuthorDate: Mon Apr 11 11:38:52 2022 -0400
Move tor-specific code outside of client library --- client/lib/lib_test.go | 5 +++-- client/{lib => }/pt_event_logger.go | 2 +- client/snowflake.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/client/lib/lib_test.go b/client/lib/lib_test.go index 45e8fe2..e1b6427 100644 --- a/client/lib/lib_test.go +++ b/client/lib/lib_test.go @@ -6,6 +6,7 @@ import ( "testing" "time"
+ "git.torproject.org/pluggable-transports/snowflake.git/v2/common/event" . "github.com/smartystreets/goconvey/convey" )
@@ -171,8 +172,8 @@ func TestSnowflakeClient(t *testing.T) {
func TestWebRTCPeer(t *testing.T) { Convey("WebRTCPeer", t, func(c C) { - eventsLogger := NewPTEventLogger() - p := &WebRTCPeer{closed: make(chan struct{}), eventsLogger: eventsLogger} + p := &WebRTCPeer{closed: make(chan struct{}), + eventsLogger: event.NewSnowflakeEventDispatcher()} Convey("checks for staleness", func() { go p.checkForStaleness(time.Second) <-time.After(2 * time.Second) diff --git a/client/lib/pt_event_logger.go b/client/pt_event_logger.go similarity index 97% rename from client/lib/pt_event_logger.go rename to client/pt_event_logger.go index 25883c4..788c074 100644 --- a/client/lib/pt_event_logger.go +++ b/client/pt_event_logger.go @@ -1,4 +1,4 @@ -package snowflake_client +package main
import ( "fmt" diff --git a/client/snowflake.go b/client/snowflake.go index 33834ad..ac66a0d 100644 --- a/client/snowflake.go +++ b/client/snowflake.go @@ -104,7 +104,7 @@ func socksAcceptLoop(ln *pt.SocksListener, config sf.ClientConfig, shutdown chan log.Println("Failed to start snowflake transport: ", err) return } - transport.AddSnowflakeEventListener(sf.NewPTEventLogger()) + transport.AddSnowflakeEventListener(NewPTEventLogger()) err = conn.Grant(&net.TCPAddr{IP: net.IPv4zero, Port: 0}) if err != nil { log.Printf("conn.Grant error: %s", err)
This is an automated email from the git hooks/post-receive script.
cohosh pushed a commit to branch main in repository pluggable-transports/snowflake.
commit aab806429fb1cec915b30a0e66a9921bf33bee74 Author: Cecylia Bocovich cohosh@torproject.org AuthorDate: Mon Apr 11 11:50:36 2022 -0400
Fix gitlab CI to work with multiple client .go files --- .gitlab-ci.yml | 2 +- go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2ef29ef..ebbcf36 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -135,7 +135,7 @@ android:
- cd $CI_PROJECT_DIR/client # gomobile builds a shared library not a CLI executable - - sed -i 's,^package main$,package snowflakeclient,' snowflake.go + - sed -i 's,^package main$,package snowflakeclient,' *.go - go get golang.org/x/mobile/bind - gomobile bind -v -target=android $REPRODUCIBLE_FLAGS .
diff --git a/go.mod b/go.mod index 705c05a..432a237 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/pion/webrtc/v3 v3.0.15 github.com/prometheus/client_golang v1.10.0 github.com/prometheus/client_model v0.2.0 - github.com/refraction-networking/utls v1.0.0 // indirect + github.com/refraction-networking/utls v1.0.0 github.com/smartystreets/goconvey v1.6.4 github.com/stretchr/testify v1.7.0 // indirect github.com/xtaci/kcp-go/v5 v5.6.1
tor-commits@lists.torproject.org