-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefix bdapi fix and Override testing (#188)
completed and tested MVP for prefix transport
- Loading branch information
Showing
15 changed files
with
651 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
|
||
# Prefix Transport | ||
|
||
**TLDR** - This transport allows up to prepend conjure connections with bytes that look like the | ||
initialization of other protocols. This can help to circumvent blocking in some areas and better | ||
understand censorship regimes, but is generally a short term solution. | ||
|
||
The `Prefix_Min` transport is a strictly improved version of the existing `Min` transport and we | ||
suggest migration. | ||
|
||
## Description | ||
|
||
This package implements the prefix transport for the conjure refraction-networking system. The | ||
prefix transport operates in much the same way as the min transport, sending a tag in the fist | ||
packet signalling to the station that the flow has knowledge of a secret shared with the station by | ||
a previous registration. | ||
|
||
TODO: Comparison to min transport | ||
|
||
### Prefixes Supported by Default | ||
|
||
TODO: The prefixes supported by default are as follows. | ||
|
||
### Ports | ||
|
||
TODO: Prefixes have default ports associated with them, but also allow port randomization. | ||
|
||
### :warning: Sharp Edges :warning: | ||
|
||
In general this transport will not properly mimic the protocols that are sent as a prefix and should | ||
not be expected to do so. | ||
|
||
## Integrating the Prefix Transport | ||
|
||
Though the client dialer allows the use of TrasnportType for compatibility reasons, the prefix | ||
transport requires use of the newer Client Transport interface (`TransportConfig` in the dialer) | ||
which is implemented by the `prefix.ClientTransport` object. | ||
|
||
TODO: code change example. | ||
|
||
## Adding a Prefix / Bidirectional Registration Prefix Overrides | ||
|
||
In order to add a prefix ... | ||
|
||
## :construction: Road-Map | ||
|
||
These features are not necessarily planned or landing imminently, they are simply things that would | ||
be nice to have. | ||
|
||
- [ ] **Server Side Prefix Override From File** - file format shared between station and Reg server | ||
describing available prefixes outside of defaults. | ||
|
||
- [ ] **TagEncodings** - Allow the tag to (by prefix configuration) be encoded using an encoder | ||
expected by the station, Base64 for example. | ||
|
||
- [ ] **StreamEncodings** - Allow the Stream of client bytes to (by configuration) encoded / | ||
encrypted using a scheme expected by the station, AES or Base64 for example. | ||
|
||
- [ ] **Randomization** - indicate segments of the prefix to be filled from a random source. | ||
|
||
- [ ] **Prefix Revocation** - If there is a prefix that is known to be blocked and we don't want | ||
clients to use it, but we still want them to roll a random prefix, how do we do this? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package prefix | ||
|
||
import "encoding/hex" | ||
|
||
var httpGetComplete []byte = d("474554202f20485454502f312e310d0a4163636570743a202a2f2a0d0a436f6e6e656374696f6e3a20636c6f73650d0a0d0a") | ||
|
||
var tlsCompleteCHSNI []byte = d("1603010200010001fc0303a08b89dd2ce2e5bc764a91bbd5cae46fdc7062e2dd6e7eb891fcec639e228c0e2062bcb02f5174081bbcd30f87015ebaca6d74a11b23de273ff5b85a3ef89f704600208a8a130113021303c02bc02fc02cc030cca9cca8c013c014009c009d002f0035010001932a2a000000230000002b000706eaea030403030010000e000c02683208687474702f312e31446900050003026832001b0003020002000000160014000011746c7366696e6765727072696e742e696f000b00020100000a000a00088a8a001d001700180033002b00298a8a000100001d0020a02f03fcf4a86e3df6c3f79aa659be0a5209946f9fd0e8fe2b3cc1b664f0985f00120000000d0012001004030804040105030805050108060601002d00020101000500050100000000ff01000100001700004a4a000100001500c6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") | ||
|
||
var tlsCompleteCHNoSNI []byte = d("1603010200010001fc0303a937d48cce916eb20df06d75f71a5954ea7b6876217ce17956c140ebd891716e20a079e04d2379c8dcd78d3f1f8075f7deb4dab5f06c014c73bf45478a486154090020eaea130113021303c02bc02fc02cc030cca9cca8c013c014009c009d002f0035010001935a5a0000ff01000100001b00030200020012000000170000000d0012001004030804040105030805050108060601000500050100000000446900050003026832002d00020101000b000201000010000e000c02683208687474702f312e3100230000002b000706eaea03040303000a000a00085a5a001d001700180033002b00295a5a000100001d00207df3a2aa3c8403fc92d8307833f51eb2576c43057afffecab53ea0bad45840642a2a000100001500e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") | ||
|
||
func d(in string) []byte { | ||
out, err := hex.DecodeString(in) | ||
if err != nil { | ||
panic(err) | ||
} | ||
return out | ||
} |
Oops, something went wrong.