mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Change package name and add a package comment
This commit is contained in:
parent
767c07dc58
commit
6c6a2e44ab
11 changed files with 38 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
||||||
package lib
|
package snowflake_client
|
||||||
|
|
||||||
// Tongue is an interface for catching Snowflakes. (aka the remote dialer)
|
// Tongue is an interface for catching Snowflakes. (aka the remote dialer)
|
||||||
type Tongue interface {
|
type Tongue interface {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package lib
|
package snowflake_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package lib
|
package snowflake_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"container/list"
|
"container/list"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// WebRTC rendezvous requires the exchange of SessionDescriptions between
|
// WebRTC rendezvous requires the exchange of SessionDescriptions between
|
||||||
// peers in order to establish a PeerConnection.
|
// peers in order to establish a PeerConnection.
|
||||||
|
|
||||||
package lib
|
package snowflake_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package lib
|
package snowflake_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package lib
|
package snowflake_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package lib
|
package snowflake_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
package lib
|
/*
|
||||||
|
Package snowflake_client implements functionality necessary for a client to establish a connection
|
||||||
|
to a server using Snowflake.
|
||||||
|
|
||||||
|
Included in the package is a Transport type that implements the Pluggable Transports v2.1 Go API
|
||||||
|
specification. To use Snowflake, you must first create a client from a configuration:
|
||||||
|
|
||||||
|
config := snowflake_client.ClientConfig{
|
||||||
|
BrokerURL: "https://snowflake-broker.example.com",
|
||||||
|
FrontDomain: "https://friendlyfrontdomain.net",
|
||||||
|
Max: 1,
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
transport, err := snowflake_client.NewSnowflakeClient(config)
|
||||||
|
if err != nil {
|
||||||
|
// handle error
|
||||||
|
}
|
||||||
|
|
||||||
|
The Dial function connects to a Snowflake server:
|
||||||
|
|
||||||
|
conn, err := transport.Dial()
|
||||||
|
if err != nil {
|
||||||
|
// handle error
|
||||||
|
}
|
||||||
|
defer conn.Close()
|
||||||
|
|
||||||
|
*/
|
||||||
|
package snowflake_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package lib
|
package snowflake_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package lib
|
package snowflake_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package lib
|
package snowflake_client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue