mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -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)
|
||||
type Tongue interface {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package lib
|
||||
package snowflake_client
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package lib
|
||||
package snowflake_client
|
||||
|
||||
import (
|
||||
"container/list"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// WebRTC rendezvous requires the exchange of SessionDescriptions between
|
||||
// peers in order to establish a PeerConnection.
|
||||
|
||||
package lib
|
||||
package snowflake_client
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package lib
|
||||
package snowflake_client
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package lib
|
||||
package snowflake_client
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package lib
|
||||
package snowflake_client
|
||||
|
||||
import (
|
||||
"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 (
|
||||
"context"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package lib
|
||||
package snowflake_client
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package lib
|
||||
package snowflake_client
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package lib
|
||||
package snowflake_client
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue