commit 5927c2bdf9266f70856602a666928da397f19bdb
Author: Cecylia Bocovich <cohosh(a)torproject.org>
Date: Wed Sep 29 15:48:31 2021 -0400
Default to a maximum value of 1 Snowflake peer
---
client/lib/snowflake.go | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/client/lib/snowflake.go b/client/lib/snowflake.go
index 3ac75b0..0096759 100644
--- a/client/lib/snowflake.go
+++ b/client/lib/snowflake.go
@@ -8,7 +8,6 @@ specification. To use Snowflake, you must …
[View More]first create a client from a configura
config := snowflake_client.ClientConfig{
BrokerURL: "https://snowflake-broker.example.com",
FrontDomain: "https://friendlyfrontdomain.net",
- Max: 1,
// ...
}
transport, err := snowflake_client.NewSnowflakeClient(config)
@@ -91,7 +90,7 @@ type ClientConfig struct {
// and testing.
KeepLocalAddresses bool
// Max is the maximum number of snowflake proxy peers that the client should attempt to
- // connect to.
+ // connect to. Defaults to 1.
Max int
}
@@ -128,7 +127,11 @@ func NewSnowflakeClient(config ClientConfig) (*Transport, error) {
}
go updateNATType(iceServers, broker)
- transport := &Transport{dialer: NewWebRTCDialer(broker, iceServers, config.Max)}
+ max := 1
+ if config.Max > max {
+ max = config.Max
+ }
+ transport := &Transport{dialer: NewWebRTCDialer(broker, iceServers, max)}
return transport, nil
}
[View Less]
commit 99887cd05d830896d2b2cda9809e4ff1a2836c93
Author: Cecylia Bocovich <cohosh(a)torproject.org>
Date: Thu Sep 9 12:54:31 2021 -0400
Add package functions to define and set the rendezvous method
Add exported functions to the snowflake client library to allow calling
programs to define and set their own custom broker rendezvous methods.
---
client/lib/rendezvous.go | 23 ++++++++--------
client/lib/rendezvous_ampcache.go | 2 +-
client/lib/rendezvous_http.…
[View More]go | 2 +-
client/lib/snowflake.go | 4 +++
doc/using-the-snowflake-library.md | 54 ++++++++++++++++++++++++++++++++++++++
5 files changed, 71 insertions(+), 14 deletions(-)
diff --git a/client/lib/rendezvous.go b/client/lib/rendezvous.go
index d58e729..cf67e09 100644
--- a/client/lib/rendezvous.go
+++ b/client/lib/rendezvous.go
@@ -26,21 +26,20 @@ const (
readLimit = 100000 //Maximum number of bytes to be read from an HTTP response
)
-// rendezvousMethod represents a way of communicating with the broker: sending
+// RendezvousMethod represents a way of communicating with the broker: sending
// an encoded client poll request (SDP offer) and receiving an encoded client
-// poll response (SDP answer) in return. rendezvousMethod is used by
+// poll response (SDP answer) in return. RendezvousMethod is used by
// BrokerChannel, which is in charge of encoding and decoding, and all other
// tasks that are independent of the rendezvous method.
-type rendezvousMethod interface {
+type RendezvousMethod interface {
Exchange([]byte) ([]byte, error)
}
-// BrokerChannel contains a rendezvousMethod, as well as data that is not
-// specific to any rendezvousMethod. BrokerChannel has the responsibility of
-// encoding and decoding SDP offers and answers; rendezvousMethod is responsible
-// for the exchange of encoded information.
+// BrokerChannel uses a RendezvousMethod to communicate with the Snowflake broker.
+// The BrokerChannel is responsible for encoding and decoding SDP offers and answers;
+// RendezvousMethod is responsible for the exchange of encoded information.
type BrokerChannel struct {
- rendezvous rendezvousMethod
+ Rendezvous RendezvousMethod
keepLocalAddresses bool
natType string
lock sync.Mutex
@@ -68,7 +67,7 @@ func NewBrokerChannel(broker, ampCache, front string, keepLocalAddresses bool) (
log.Println("Domain fronting using:", front)
}
- var rendezvous rendezvousMethod
+ var rendezvous RendezvousMethod
var err error
if ampCache != "" {
rendezvous, err = newAMPCacheRendezvous(broker, ampCache, front, createBrokerTransport())
@@ -80,7 +79,7 @@ func NewBrokerChannel(broker, ampCache, front string, keepLocalAddresses bool) (
}
return &BrokerChannel{
- rendezvous: rendezvous,
+ Rendezvous: rendezvous,
keepLocalAddresses: keepLocalAddresses,
natType: nat.NATUnknown,
}, nil
@@ -118,8 +117,8 @@ func (bc *BrokerChannel) Negotiate(offer *webrtc.SessionDescription) (
return nil, err
}
- // Do the exchange using our rendezvousMethod.
- encResp, err := bc.rendezvous.Exchange(encReq)
+ // Do the exchange using our RendezvousMethod.
+ encResp, err := bc.Rendezvous.Exchange(encReq)
if err != nil {
return nil, err
}
diff --git a/client/lib/rendezvous_ampcache.go b/client/lib/rendezvous_ampcache.go
index 4856893..2f1fb9f 100644
--- a/client/lib/rendezvous_ampcache.go
+++ b/client/lib/rendezvous_ampcache.go
@@ -11,7 +11,7 @@ import (
"git.torproject.org/pluggable-transports/snowflake.git/common/amp"
)
-// ampCacheRendezvous is a rendezvousMethod that communicates with the
+// ampCacheRendezvous is a RendezvousMethod that communicates with the
// .../amp/client route of the broker, optionally over an AMP cache proxy, and
// with optional domain fronting.
type ampCacheRendezvous struct {
diff --git a/client/lib/rendezvous_http.go b/client/lib/rendezvous_http.go
index 01219cb..e020077 100644
--- a/client/lib/rendezvous_http.go
+++ b/client/lib/rendezvous_http.go
@@ -10,7 +10,7 @@ import (
"net/url"
)
-// httpRendezvous is a rendezvousMethod that communicates with the .../client
+// httpRendezvous is a RendezvousMethod that communicates with the .../client
// route of the broker over HTTP or HTTPS, with optional domain fronting.
type httpRendezvous struct {
brokerURL *url.URL
diff --git a/client/lib/snowflake.go b/client/lib/snowflake.go
index fb7fab9..e0591a7 100644
--- a/client/lib/snowflake.go
+++ b/client/lib/snowflake.go
@@ -132,6 +132,10 @@ func (t *Transport) Dial() (net.Conn, error) {
return &SnowflakeConn{Stream: stream, sess: sess, pconn: pconn, snowflakes: snowflakes}, nil
}
+func (t *Transport) SetRendezvousMethod(r RendezvousMethod) {
+ t.dialer.Rendezvous = r
+}
+
type SnowflakeConn struct {
*smux.Stream
sess *smux.Session
diff --git a/doc/using-the-snowflake-library.md b/doc/using-the-snowflake-library.md
index 9308cdc..4dc47fc 100644
--- a/doc/using-the-snowflake-library.md
+++ b/doc/using-the-snowflake-library.md
@@ -38,6 +38,60 @@ func main() {
}
```
+#### Using your own rendezvous method
+
+You can define and use your own rendezvous method to communicate with a Snowflake broker by implementing the `RendezvousMethod` interface.
+
+```Golang
+
+package main
+
+import (
+ "log"
+
+ sf "git.torproject.org/pluggable-transports/snowflake.git/client/lib"
+)
+
+type StubMethod struct {
+}
+
+func (m *StubMethod) Exchange(pollReq []byte) ([]byte, error) {
+ var brokerResponse []byte
+ var err error
+
+ //Implement the logic you need to communicate with the Snowflake broker here
+
+ return brokerResponse, err
+}
+
+func main() {
+ config := sf.ClientConfig{
+ ICEAddresses: []string{
+ "stun:stun.voip.blackberry.com:3478",
+ "stun:stun.stunprotocol.org:3478"},
+ }
+ transport, err := sf.NewSnowflakeClient(config)
+ if err != nil {
+ log.Fatal("Failed to start snowflake transport: ", err)
+ }
+
+ // custom rendezvous methods can be set with `SetRendezvousMethod`
+ rendezvous := &StubMethod{}
+ transport.SetRendezvousMethod(rendezvous)
+
+ // transport implements the ClientFactory interface and returns a net.Conn
+ conn, err := transport.Dial()
+ if err != nil {
+ log.Printf("dial error: %s", err)
+ return
+ }
+ defer conn.Close()
+
+ // ...
+
+}
+```
+
### Server library
The Snowflake server library contains functions for running a Snowflake server.
[View Less]
commit 2d0fe2165a1b89496ed4235871fa9c8d463a8424
Author: Translation commit bot <translation(a)torproject.org>
Date: Sun Oct 3 23:16:57 2021 +0000
https://gitweb.torproject.org/translation.git/commit/?h=tbmanual-contentspot
---
contents+es.po | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/contents+es.po b/contents+es.po
index 6428139f61..175f5e5330 100644
--- a/contents+es.po
+++ b/contents+es.po
@@ -410,6 +410,10 @@ msgid ""
"verifying the download), the fingerprint of …
[View More]the key used to make the "
"signature, and the package’s checksum."
msgstr ""
+"GetTor responderá con un correo electrónico que contiene enlaces desde los "
+"que puedes descargar el paquete del Navegador Tor, la firma criptográfica "
+"(necesaria para verificar la descarga), la huella digital de la clave "
+"utilizada para hacer la firma, y la suma de comprobación del paquete."
#: https//tb-manual.torproject.org/downloading/
#: (content/downloading/contents+en.lrtopic.body)
@@ -417,6 +421,8 @@ msgid ""
"You may be offered a choice of “32-bit” or “64-bit” software: this depends "
"on the model of the computer you are using."
msgstr ""
+"Es posible que se te ofrezca la opción entre software de \"32 bits\" o \"64 "
+"bits\": esto depende del modelo de computadora que estés utilizando."
#: https//tb-manual.torproject.org/installation/
#: (content/installation/contents+en.lrtopic.title)
[View Less]
commit 5d89b679b8fb7811ef6fa63a2fcb0690fc23aa16
Author: Translation commit bot <translation(a)torproject.org>
Date: Sun Oct 3 22:16:49 2021 +0000
https://gitweb.torproject.org/translation.git/commit/?h=tails-misc_release
---
es_AR.po | 42 +++++++++++++++++++++---------------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/es_AR.po b/es_AR.po
index 23bc8f33bd..9b8cc081d5 100644
--- a/es_AR.po
+++ b/es_AR.po
@@ -18,7 +18,7 @@ msgstr ""
"Project-Id-Version: …
[View More]Tor Project\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-06 12:01+0200\n"
-"PO-Revision-Date: 2021-09-26 17:06+0000\n"
+"PO-Revision-Date: 2021-10-03 21:56+0000\n"
"Last-Translator: Zuhualime Akoochimoya\n"
"Language-Team: Spanish (Argentina) (http://www.transifex.com/otf/torproject/language/es_AR/)\n"
"MIME-Version: 1.0\n"
@@ -1715,13 +1715,13 @@ msgstr "_Usar un puente que ya conozco"
msgid ""
"To save your bridge, <a href=\"doc/first_steps/persistence\">unlock you "
"Persistent Storage</a>."
-msgstr ""
+msgstr "Para guardar tu puente, <a href=\"doc/first_steps/persistence\">desbloqueá tu almacenamiento persistente</a>."
#: config/chroot_local-includes/usr/lib/python3/dist-packages/tca/ui/main_window.py:245
msgid ""
"To save your bridge, <a href=\"doc/first_steps/persistence\">create a "
"Persistent Storage</a> on your Tails USB stick."
-msgstr ""
+msgstr "Para guardar tu puente, <a href=\"doc/first_steps/persistence\">creá un Almacenamiento Persistente</a> en tu memoria USB de Tails."
#: config/chroot_local-includes/usr/lib/python3/dist-packages/tca/ui/main_window.py:265
#: config/chroot_local-includes/usr/lib/python3/dist-packages/tca/ui/main_window.py:668
@@ -1749,7 +1749,7 @@ msgstr "Conectando a Tor con puentes predeterminados..."
#: config/chroot_local-includes/usr/lib/python3/dist-packages/tca/ui/main_window.py:433
msgid "Connecting to Tor with a custom bridge…"
-msgstr ""
+msgstr "Conectando a Tor con un puente personalizado..."
#: config/chroot_local-includes/usr/lib/python3/dist-packages/tca/ui/main_window.py:542
msgid ""
@@ -1775,7 +1775,7 @@ msgid ""
"Tails will continue connecting to Tor after you close the Tor Connection assistant.\n"
"\n"
"If connecting to Tor fails, you will have to wait again until the end of the progress bar to be able to troubleshoot your connection."
-msgstr ""
+msgstr "Tails va a continuar conectándose a Tor después de que cierres el asistente de conexión de Tor.\n\nSi la conexión falla, vas a tener que esperar de nuevo hasta que la barra de progreso termine, para poder diagnosticar el problema con tu conexión."
#: config/chroot_local-includes/usr/local/bin/thunderbird:41
msgid "You need to migrate your OpenPGP keys"
@@ -2028,7 +2028,7 @@ msgid ""
"The Unsafe Browser was not enabled in the Welcome Screen.\\n\\nTo use the "
"Unsafe Browser, restart Tails and enable the Unsafe Browser in the "
"additional settings of the Welcome Screen."
-msgstr ""
+msgstr "El Navegador Inseguro no fue habilitado en la Pantalla de Bienvenida.\\n/nPara usar el Navegador Inseguro, reiniciá Tails y habilitá el Navegador Inseguro en la configuración adicional de la Pantalla de Bienvenida."
#: config/chroot_local-includes/usr/local/sbin/unsafe-browser:95
msgid ""
@@ -2379,7 +2379,7 @@ msgid ""
"A captive portal is a web page that is displayed before you can access the Internet. Captive portals usually require you to log in to the network or enter information such as an email address.\n"
"\n"
"The Unsafe Browser is not anonymous and can deanonymize you. Use it only to sign in to networks."
-msgstr ""
+msgstr "El Navegador Inseguro te permite iniciar sesión en una red que usa un portal cautivo.\n\nUn portal cautivo es una página web que se muestra antes de que puedas acceder a Internet. Los portales cautivos normalmente requieren que te identifiques en la red o que introduzcas información, como un correo electrónico.\n\nEl Navegador Inseguro no es anónimo y puede desanonimizarte. Usalo solo para iniciar sesión en las redes."
#: ../config/chroot_local-includes/usr/share/tails/greeter/additional_settings.ui.in:574
msgid "Disable the Unsafe Browser (default)"
@@ -2576,7 +2576,7 @@ msgstr "Configurar un puente Tor"
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:76
msgid "heading"
-msgstr ""
+msgstr "encabezado"
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:94
msgid ""
@@ -2625,15 +2625,15 @@ msgstr "Actualmente en Tails, solo los puentes obfs4 ocultan tu uso de Tor.\n\nl
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:372
msgid "Save bridge to _Persistent Storage"
-msgstr ""
+msgstr "Guardar el puente en _Almacenamiento Persistente"
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:397
msgid "Save bridge to Persistent Storage"
-msgstr ""
+msgstr "Guardar el puente en Almacenamiento Persistente"
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:398
msgid "toggle-button"
-msgstr ""
+msgstr "botón-conmutador"
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:538
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:936
@@ -2653,11 +2653,11 @@ msgstr "• Reloj equivocado"
msgid ""
"To prevent network attacks, your time zone and clock need to be correct to "
"connect to Tor using a bridge."
-msgstr ""
+msgstr "Para evitar ataques de red, tu huso horario y tu reloj necesitan estar correctos para conectarte a Tor utilizando un puente."
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:639
msgid "Fix _Clock"
-msgstr ""
+msgstr "Fijar _Reloj"
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:676
msgid "• Public network"
@@ -2671,7 +2671,7 @@ msgstr "Si estás en un negocio, hotel o aeropuerto, puede que necesités inicia
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:709
msgid "Try _Signing in to the Network"
-msgstr ""
+msgstr "Intentar _Iniciar sesión en la Red"
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:747
msgid "• Local proxy"
@@ -2689,7 +2689,7 @@ msgstr "Configurar un _Proxy local"
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:818
msgid "• Bridge over email"
-msgstr ""
+msgstr "• Puente por correo electrónico"
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:838
msgid ""
@@ -2698,7 +2698,7 @@ msgid ""
"1. Send an empty email to <tt>bridges(a)torproject.org</tt> from a Gmail or Riseup email address.\n"
"\n"
"2. Type below one of the bridges that you received by email."
-msgstr ""
+msgstr "Para solicitar nuevos puentes Tor, también podés:\n\n1. Enviar un correo vacío a <tt>bridges(a)torproject.org</tt> desde una dirección electrónica de Gmail o Riseup.\n\n2. Escribir debajo uno de los puentes que recibiste por correo electrónico."
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:971
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:1379
@@ -2739,11 +2739,11 @@ msgid ""
"Tor bridges are secret Tor relays. Use a bridge as your first Tor relay if connections to Tor are blocked, for example in some countries, by some public networks, or by some parental controls.\n"
"\n"
"Choose this option if you already know that you need a bridge. Otherwise, Tails will autodetect whether you need a bridge to connect to Tor from your local network."
-msgstr ""
+msgstr "Los puentes Tor son repetidores secretos. Usá un puente como tu primer repetidor de Tor si se bloquea la conexión con Tor, por ejemplo en algunos países, redes públicas o controles parentales.\n\nElegí esta opción si ya sabés que necesitás puentes. De lo contrario, Tails va a autodetectar si necesita puentes para conectarse a Tor desde tu red local."
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:1211
msgid "<b>_Hide to my local network that I'm connecting to Tor (safer)</b>"
-msgstr ""
+msgstr "<b>_Escondé de mi red local que stoy conectándome a Tor (más seguro)</b>"
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:1261
msgid ""
@@ -2758,7 +2758,7 @@ msgid ""
"Our team is doing its best to help you connect to Tor using the most discrete types of Tor bridges.\n"
"\n"
"You will have to do extra configuration if you don't know any Tor bridges yet, if you connect from a public Wi-Fi network, or if you are in the Eastern Hemisphere."
-msgstr ""
+msgstr "Tails solo se va a conectar a Tor después de que configurés un puente. Los puentes son repetidores Tor secretos que ocultan el hecho de que estás conectado a Tor.\n\nNuestro equipo está haciendo todo lo posible para ayudar a conectarte a Tor utilizando los tipos más discretos de puentes.\n\nVas a tener que hacer una configuración extra si todavía no conocés ningún puente Tor, si te conectés desde una red pública Wi-Fi, o si estás en el hemisferio oriental."
#: ../config/chroot_local-includes/usr/share/tails/tca/main.ui.in:1324
msgid ""
@@ -2874,14 +2874,14 @@ msgstr "_Guardar los ajustes del proxy"
#: ../config/chroot_local-includes/usr/share/tails/tca/time-dialog.ui.in:7
msgid "Tor Connection - Fix Clock"
-msgstr ""
+msgstr "Conexión a Tor - fijar hora"
#: ../config/chroot_local-includes/usr/share/tails/tca/time-dialog.ui.in:76
msgid ""
"To prevent network attacks, your time zone and clock need to be correct to connect to Tor using bridges.\n"
"\n"
"Your time zone and clock cannot be used to identify or geolocalize you. Your time zone will never be sent over the network and will only be used to fix your clock and connect to Tor."
-msgstr ""
+msgstr "Para evitar ataques de red, deben de estar correctos tu huso horario y tu reloj para conectarse a Tor usando puentes.\n\nTu huso horario y reloj no se pueden usar para identificarte o geolocalizarte. Tu huso horario nunca se va a enviar a través de la red, y sólo se va a utilizar para fijar el reloj y conectar a Tor."
#: ../config/chroot_local-includes/usr/share/tails/tca/time-dialog.ui.in:117
msgid "Select the time zone you want to use"
[View Less]