Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
IPtProxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leap
Android Libs
IPtProxy
Commits
6a625b72
Commit
6a625b72
authored
3 years ago
by
Benjamin Erhart
Browse files
Options
Downloads
Patches
Plain Diff
Update Snowflake to release 2.1.0.
parent
90ea1224
Branches
Branches containing commit
No related tags found
1 merge request
!2
update to v 1.7.1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
build.sh
+1
-1
1 addition, 1 deletion
build.sh
snowflake
+1
-1
1 addition, 1 deletion
snowflake
snowflake.patch
+15
-15
15 additions, 15 deletions
snowflake.patch
with
17 additions
and
17 deletions
build.sh
+
1
−
1
View file @
6a625b72
...
@@ -38,7 +38,7 @@ else
...
@@ -38,7 +38,7 @@ else
cd
..
cd
..
git clone https://git.torproject.org/pluggable-transports/snowflake.git
git clone https://git.torproject.org/pluggable-transports/snowflake.git
cd
snowflake
||
exit
1
cd
snowflake
||
exit
1
git checkout
--force
--quiet
e
ad5a960
git checkout
--force
--quiet
e
6e5e20a
cd
..
cd
..
fi
fi
...
...
This diff is collapsed.
Click to expand it.
snowflake
@
e6e5e20a
Subproject commit e
ad5a960d7fa19dc890ccbfc0765c5ab6629eaa9
Subproject commit e
6e5e20ae8b5883b37f5dea656540825e237d820
This diff is collapsed.
Click to expand it.
snowflake.patch
+
15
−
15
View file @
6a625b72
diff --git a/client/snowflake.go b/client/snowflake.go
diff --git a/client/snowflake.go b/client/snowflake.go
index
d76efbf..dd2868
1 100644
index
5a00206..290a12
1 100644
--- a/client/snowflake.go
--- a/client/snowflake.go
+++ b/client/snowflake.go
+++ b/client/snowflake.go
@@ -1,8 +1,7 @@
@@ -1,8 +1,7 @@
...
@@ -21,7 +21,7 @@ index d76efbf..dd28681 100644
...
@@ -21,7 +21,7 @@ index d76efbf..dd28681 100644
// Exchanges bytes between two ReadWriters.
// Exchanges bytes between two ReadWriters.
// (In this case, between a SOCKS connection and a snowflake transport conn)
// (In this case, between a SOCKS connection and a snowflake transport conn)
func copyLoop(socks, sfconn io.ReadWriter) {
func copyLoop(socks, sfconn io.ReadWriter) {
@@ -1
19
,23 +12
0
,13 @@
func socksAcceptLoop(ln *pt.SocksListener, config sf.ClientConfig, shutdown chan
@@ -1
20
,23 +12
1
,13 @@
func socksAcceptLoop(ln *pt.SocksListener, config sf.ClientConfig, shutdown chan
}
}
}
}
...
@@ -51,7 +51,7 @@ index d76efbf..dd28681 100644
...
@@ -51,7 +51,7 @@ index d76efbf..dd28681 100644
log.SetFlags(log.LstdFlags | log.LUTC)
log.SetFlags(log.LstdFlags | log.LUTC)
@@ -19
5
,7 +18
6
,7 @@
func main() {
@@ -19
6
,7 +18
7
,7 @@
func main() {
switch methodName {
switch methodName {
case "snowflake":
case "snowflake":
// TODO: Be able to recover when SOCKS dies.
// TODO: Be able to recover when SOCKS dies.
...
@@ -60,7 +60,7 @@ index d76efbf..dd28681 100644
...
@@ -60,7 +60,7 @@ index d76efbf..dd28681 100644
if err != nil {
if err != nil {
pt.CmethodError(methodName, err.Error())
pt.CmethodError(methodName, err.Error())
break
break
@@ -21
0
,7 +20
1
,6 @@
func main() {
@@ -21
1
,7 +20
2
,6 @@
func main() {
}
}
pt.CmethodsDone()
pt.CmethodsDone()
...
@@ -68,7 +68,7 @@ index d76efbf..dd28681 100644
...
@@ -68,7 +68,7 @@ index d76efbf..dd28681 100644
signal.Notify(sigChan, syscall.SIGTERM)
signal.Notify(sigChan, syscall.SIGTERM)
if os.Getenv("TOR_PT_EXIT_ON_STDIN_CLOSE") == "1" {
if os.Getenv("TOR_PT_EXIT_ON_STDIN_CLOSE") == "1" {
@@ -23
7
,3 +22
7
,8 @@
func main() {
@@ -23
8
,3 +22
8
,8 @@
func main() {
wg.Wait()
wg.Wait()
log.Println("snowflake is done.")
log.Println("snowflake is done.")
}
}
...
@@ -78,28 +78,28 @@ index d76efbf..dd28681 100644
...
@@ -78,28 +78,28 @@ index d76efbf..dd28681 100644
+ sigChan <- syscall.SIGTERM
+ sigChan <- syscall.SIGTERM
+}
+}
diff --git a/proxy/lib/snowflake.go b/proxy/lib/snowflake.go
diff --git a/proxy/lib/snowflake.go b/proxy/lib/snowflake.go
index
e39fcfb..d8b72fa
100644
index
8747f66..735c433
100644
--- a/proxy/lib/snowflake.go
--- a/proxy/lib/snowflake.go
+++ b/proxy/lib/snowflake.go
+++ b/proxy/lib/snowflake.go
@@ -1
02
,6 +1
02
,8 @@
type SnowflakeProxy struct {
@@ -1
17
,6 +1
17
,8 @@
type SnowflakeProxy struct {
// NATProbeURL is the URL of the probe service we use for NAT checks
NATTypeMeasurementInterval time.Duration
NATProbeURL string
EventDispatcher event.SnowflakeEventDispatcher
shutdown chan struct{}
shutdown chan struct{}
+
+
+ ClientConnectedCallback func()
+ ClientConnectedCallback func()
}
}
// Checks whether an IP address is a remote address for the client
// Checks whether an IP address is a remote address for the client
@@ -183,7 +185,7 @@
func (s *SignalingServer) pollOffer(sid string, shutdown chan struct{}) *webrtc.
@@ -199,7 +201,7 @@
func (s *SignalingServer) pollOffer(sid string, shutdown chan struct{}) *webrtc.
return nil
default:
default:
numClients := int((tokens.count() / 8) * 8) // Round down to 8
numClients := int((tokens.count() / 8) * 8) // Round down to 8
- body, err := messages.EncodePollRequest(sid, "standalone", currentNATType, numClients)
currentNATTypeLoaded := getCurrentNATType()
+ body, err := messages.EncodePollRequest(sid, "iptproxy", currentNATType, numClients)
- body, err := messages.EncodePollRequest(sid, "standalone", currentNATTypeLoaded, numClients)
+ body, err := messages.EncodePollRequest(sid, "iptproxy", currentNATTypeLoaded, numClients)
if err != nil {
if err != nil {
log.Printf("Error encoding poll message: %s", err.Error())
log.Printf("Error encoding poll message: %s", err.Error())
return nil
return nil
@@ -4
74
,6 +47
6
,8 @@
func (sf *SnowflakeProxy) runSession(sid string) {
@@ -4
95
,6 +4
9
7,8 @@
func (sf *SnowflakeProxy) runSession(sid string) {
select {
select {
case <-dataChan:
case <-dataChan:
log.Println("Connection successful.")
log.Println("Connection successful.")
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment