Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
29d66d4
WIP: implement client for dark decoy
sergeyfrolov Jan 22, 2019
470d5bd
Merge branch 'master' into dark-decoy
sergeyfrolov Jan 29, 2019
da85e7a
WIP: wippy wip mcwipface
sergeyfrolov Feb 8, 2019
6f80f48
WIP: first working client prototype
sergeyfrolov Feb 8, 2019
e75da68
WIP: make transparent proxy listen forever+gofmt
sergeyfrolov Feb 14, 2019
45d2583
WIP: use obfs4 instead of transparent proxy
sergeyfrolov Apr 21, 2019
d5964c2
gofmt
sergeyfrolov Apr 26, 2019
7fdbce2
Conjure: integrated prototype with 2-way-proxy
sergeyfrolov May 13, 2019
632cb59
Allow Client to drive V4/V6 decoy ip selection
jmwample Jun 26, 2019
c45e91c
pivot to bool for ipv6 support over uint32 - passing generation tests
jmwample Jul 2, 2019
b5ce979
Implemented v6 support check and fallback
jmwample Aug 5, 2019
bce0f39
updated naming and CLI usage compiles and registers with dark decoy s…
jmwample Aug 5, 2019
53b13f4
merge changes to dark decoy (specifically flag implementations and ob…
jmwample Aug 5, 2019
12a05e3
v4v6 fallback with proxy header support
jmwample Aug 8, 2019
b8a9df5
added command line options for specifying proxy header use and Ipv6 i…
jmwample Aug 15, 2019
f106f8a
using reserved IP blocks to identify ipv6support instead of interface…
jmwample Aug 15, 2019
b782a68
conjure: finalize move to the new repo (#12)
sergeyfrolov Sep 6, 2019
1e43cfc
merged changes migrating repo
jmwample Sep 11, 2019
a7d6bc8
fixes leading to merge into dark-decoy
jmwample Sep 12, 2019
c0c6dc9
Travis build (#17)
jmwample Sep 13, 2019
71108b0
completing requested changes
jmwample Sep 16, 2019
8a302a7
ClientConf digest during build (#18)
jmwample Sep 16, 2019
55a8635
merging upstream build process from dark-decoys
jmwample Sep 16, 2019
f537a62
TapDance -> Refraction
ewust Sep 24, 2019
32a1df6
typo
ewust Sep 24, 2019
61be2bc
Travis build fixes (#23)
jmwample Sep 30, 2019
2fb2377
Merge branch 'dark-decoy' into v4v6
jmwample Sep 30, 2019
80fc2a1
Split Registration and Connection -- no obvious errors, completely un…
jmwample Oct 13, 2019
55020c9
adding test functions to make sure conjure functionality is reproduci…
Oct 14, 2019
3d853eb
cleaning registration context, and callback
jmwample Oct 14, 2019
6310374
Added V6 addresses to decoys in ClientConf
jmwample Oct 14, 2019
6b5a8e0
added script
jmwample Oct 14, 2019
a3df763
quick cleanup
jmwample Oct 14, 2019
b3afe3d
success reading v6decoys from clientConf
jmwample Oct 14, 2019
8eab195
IPv6 Decoy deduplication
Oct 15, 2019
68735a5
Bug Hunting
Oct 16, 2019
e8bb948
v6 fixes and patches, bug hunting
jmwample Oct 17, 2019
1655e83
adding broader v4v6 support
jmwample Oct 17, 2019
0f9e3d1
Bug Hunting
jmwample Oct 18, 2019
94a0409
cleaning tests
Oct 19, 2019
735a0f7
fix inneffectial assign error in gometalinter
Oct 19, 2019
b760afb
adding v6 support to assets to track across sessions
jmwample Oct 22, 2019
8fc068a
registration fixes
jmwample Oct 23, 2019
89ebcbd
quick fixes
jmwample Oct 23, 2019
4f6c01f
merge things
jmwample Oct 23, 2019
8f31b09
adding test v6 decoy that definitely goes past curveball
Oct 24, 2019
f5a380b
Merge branch 'registration' of github.com:refraction-networking/gotap…
jmwample Oct 24, 2019
5b6f2af
support patches
jmwample Oct 24, 2019
50f1e66
fixing bugs with min transport -- DATA WORKING
jmwample Oct 24, 2019
c6b1dd3
test fix for build system
jmwample Oct 24, 2019
3b5692b
gometalinter fixes
jmwample Oct 24, 2019
661b15f
v6 cleanup (no longer caching v6 support in assets
jmwample Oct 25, 2019
c04f28f
Remove dependence on station_pubkey file in assets folder. Reads defa…
jmwample Oct 28, 2019
0f8e87e
Modify travis build to include Conjure ConsoleClient
jmwample Oct 29, 2019
7bb3269
format fix
jmwample Oct 29, 2019
5c8ac46
mistaken about config
jmwample Oct 29, 2019
1ec9c2e
updating to latest psiphon core commit
jmwample Oct 29, 2019
0530755
travis restructure to try to fix broken build
jmwample Oct 29, 2019
1c8e7aa
adding new fields required byPsiphon in EmbeddedValues
jmwample Oct 30, 2019
9fb5277
bypassing old docker image for android build
jmwample Oct 30, 2019
c9ceb0a
building on updated docker image
jmwample Oct 30, 2019
f06108d
gradlew build issue with min api version
jmwample Oct 30, 2019
2ee72ec
enbale debug
jmwample Oct 30, 2019
2a5a5e3
adding patch for psiphon compatibility with java 1.8
jmwample Oct 30, 2019
c0b4050
trying to fix regions redirect issues
jmwample Oct 30, 2019
7d231bd
Travis build conjure (#25)
jmwample Oct 31, 2019
43f63ab
Conjure MinTransport (#26)
ewust Nov 3, 2019
033409a
Register both (#31)
jmwample Nov 5, 2019
a8f2343
adding logging update to trigger rebuild
jmwample Nov 5, 2019
31c1656
use TcpDialer for connect
ewust Nov 6, 2019
44d29d6
Merge branch 'conjure' of github.com:refraction-networking/gotapdance…
ewust Nov 6, 2019
eb21467
add build apk script
ewust Nov 6, 2019
71ff764
Conjure full (#35)
jmwample Dec 20, 2019
6a0a61c
re-implement phantom selection as it's own submodule. (#36)
jmwample Apr 2, 2020
7368c2b
Update/clientconf (#37)
jmwample Apr 2, 2020
a4ab977
addressing issue #38 by moving ed25519 code locally to keep elligator…
jmwample Apr 4, 2020
51cfadd
corrected github links that I missed
jmwample Apr 5, 2020
a025153
missed one
jmwample Apr 5, 2020
55aa512
fix sed issue in build
jmwample Apr 5, 2020
9cdcbb8
applying patch for bit leak from pull request
jmwample Apr 5, 2020
88f635e
TestObfuscationRandomness test was not passing with patch applied
jmwample Apr 6, 2020
17db0b3
attempted hot patch for missing go dependencies in build pipeline
jmwample Apr 6, 2020
14018bc
simple elligator util
ewust Apr 6, 2020
1db26d2
fix -b representation issue
ewust Apr 6, 2020
b2a45e1
Debug travis docker golang problems
jmwample Apr 8, 2020
db0de23
cleanup tools for build reasons
jmwample Apr 8, 2020
ca4800b
bit always zero in test -> expected behavior for now
jmwample Apr 8, 2020
9cad01b
added debug logging reasons for failed registration connections
jmwample Apr 13, 2020
398016b
Update/local ed25519 (#39)
jmwample Apr 13, 2020
2479067
randomizing two bits on the client see PR #39 and issue #38
jmwample Apr 13, 2020
bec9b78
merge forgotten commit
jmwample Apr 13, 2020
a7f915a
Psiphon travis build pipeline (#40)
jmwample May 4, 2020
58083f0
updated to clientconf decoy list generation 1119
jmwample May 22, 2020
5e7985f
added script for testing decoy connecitons
jmwample Jun 5, 2020
a9c5914
fixed issue with wait group
jmwample Jun 5, 2020
cfe192a
Always unlock assets when setting
CarsonHoffman Jul 14, 2020
30246df
Registration API Functionality (#43)
CarsonHoffman Aug 6, 2020
73dad09
Build updates (#47)
jmwample Aug 26, 2020
d0b10ba
obfs4 Support (#44)
CarsonHoffman Aug 28, 2020
2344d7e
Add registration source field to ZMQPayload (#46)
CarsonHoffman Sep 15, 2020
c4d0711
merge master into conjure
jmwample Sep 30, 2020
a5b4330
missed integration items
jmwample Sep 30, 2020
a63ccde
more fixes
jmwample Sep 30, 2020
2d2be1c
missed a func
jmwample Oct 3, 2020
0d9ea35
Android build tools update for travis-ci
jmwample Oct 3, 2020
6905c05
Conjure Build issues and merge compatibility (#51)
jmwample Oct 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 134 additions & 51 deletions .travis.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<p align="center">
<a href="https://refraction.network"><img src="https://user-images.githubusercontent.com/5443147/30133006-7c3019f4-930f-11e7-9f60-3df45ee13d9d.png" alt="refract"></a>
<h1 class="header-title" align="center">TapDance Client</h1>
<h1 class="header-title" align="center">Refraction Networking Client</h1>

<p align="center">TapDance is a free-to-use anti-censorship technology, protected from enumeration attacks.</p>
<p align="center">Refraction Networking is a free-to-use anti-censorship technology, that places proxies at Internet Service Providers, so they are harder to block. This client includes support for both the TapDance and Conjure protocols</p>
<p align="center">
<a href="https://travis-ci.org/refraction-networking/gotapdance"><img src="https://travis-ci.org/refraction-networking/gotapdance.svg?branch=master"></a>
<a href="https://godoc.org/github.com/refraction-networking/gotapdance/tapdance"><img src="https://img.shields.io/badge/godoc-reference-blue.svg"></a>
Expand Down
Binary file modified assets/ClientConf
Binary file not shown.
Binary file added assets/ClientConf.old
Binary file not shown.
69 changes: 69 additions & 0 deletions build-apk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/bin/bash


REPO_DIR=$GOPATH/src/github.com/refraction-networking/gotapdance/

#sed -i.bak "s/buildInfo = \"\"/buildInfo = \"$TRAVIS_BRANCH-$TRAVIS_COMMIT\"/" tapdance/logger.go
git clone https://github.com/Psiphon-Labs/psiphon-tunnel-core.git $GOPATH/src/github.com/Psiphon-Labs/psiphon-tunnel-core
cd $GOPATH/src/github.com/Psiphon-Labs/psiphon-tunnel-core && git checkout -b build-refraction-networking


go get github.com/kardianos/govendor
cd $GOPATH/src/github.com/Psiphon-Labs/psiphon-tunnel-core && $GOPATH/bin/govendor remove github.com/refraction-networking/gotapdance/...

sed -i.bak 's/refraction_networking_tapdance.Logger().Out = ioutil.Discard//' $GOPATH/src/github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/tapdance/tapdance.go


# Conjure APK
echo "Conjure APK before_Script"

cd $GOPATH/src/github.com/refraction-networking/gotapdance

docker pull refraction/psiandroid:latest

mkdir -p $GOPATH/src/bitbucket.org/psiphon
hg clone https://bitbucket.org/psiphon/psiphon-circumvention-system $GOPATH/src/bitbucket.org/psiphon/psiphon-circumvention-system

cd $GOPATH/src/bitbucket.org/psiphon/psiphon-circumvention-system #&& hg checkout

# Use modified EmbeddedValues.java for TapDance
cd $GOPATH/src/github.com/refraction-networking/gotapdance
/usr/local/ssl/bin/openssl enc -nosalt -aes-256-cbc -md sha512 -pbkdf2 -iter 1000 -pass pass:$aes_cbc_passwd -d -in build/EmbeddedValues.java.enc -out $GOPATH/src/bitbucket.org/psiphon/psiphon-circumvention-system/Android/app/src/main/java/com/psiphon3/psiphonlibrary/EmbeddedValues.java

echo "patching..."
# Patched tunneling protocol for TapDance
patch $GOPATH/src/bitbucket.org/psiphon/psiphon-circumvention-system/Android/app/src/main/java/com/psiphon3/psiphonlibrary/TunnelManager.java build/TunnelManager.java.patch

# Patch the Psiphon app's gradle build for java 1.8 compatibility [TODO]{priority:later} remove this when psiphon merges it themselves
patch $GOPATH/src/bitbucket.org/psiphon/psiphon-circumvention-system/Android/app/build.gradle build/PsiphonCoreGradle.patch

# Add dialer options to enable Conjure
patch $GOPATH/src/github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/tapdance/tapdance.go build/conjure.golang.patch

echo "digesting..."
# Digest this branch's ClientConf into Psiphon's embedded_config
./test_scripts/psiphon_digest_cc.sh ./assets/ClientConf $GOPATH/src/github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/tapdance/embedded_config.go

echo "Conjure APK script"
cd $REPO_DIR

# Build Psiphon Android Library ca.psiphon.aar
#docker run -v $DOCKER_DIR:$GOPATH/go/src/github.com/refraction-networking/gotapdance -v $GOPATH/src/github.com/Psiphon-Labs/psiphon-tunnel-core:$GOPATH/go/src/github.com/Psiphon-Labs/psiphon-tunnel-core refraction/psiandroid /bin/bash -c 'cd $GOPATH/src/github.com/Psiphon-Labs/psiphon-tunnel-core/MobileLibrary/Android && ./make.bash "TAPDANCE"'
docker run -v $REPO_DIR:/go/src/github.com/refraction-networking/gotapdance -v $GOPATH/src/github.com/Psiphon-Labs/psiphon-tunnel-core:/go/src/github.com/Psiphon-Labs/psiphon-tunnel-core refraction/psiandroid /bin/bash -c 'cd /go/src/github.com/Psiphon-Labs/psiphon-tunnel-core/MobileLibrary/Android && ./make.bash "TAPDANCE"'

echo "moving .aar"
cd $GOPATH/src/github.com/refraction-networking/gotapdance
mv $GOPATH/src/github.com/Psiphon-Labs/psiphon-tunnel-core/MobileLibrary/Android/ca.psiphon.aar build/

# Build Psiphon Android App PsiphonAndroid-debug.apk
cp -f build/ca.psiphon.aar $GOPATH/src/bitbucket.org/psiphon/psiphon-circumvention-system/Android/app/libs/

cd $GOPATH/src/github.com/refraction-networking/gotapdance
echo "docker run gradlew assembleDebug.."
#docker run -v $DOCKER_DIR:/go/src/github.com/refraction-networking/gotapdance -v $GOPATH/src/bitbucket.org/psiphon/psiphon-circumvention-system/Android:/go/src/bitbucket.org/psiphon/psiphon-circumvention-system/Android refraction/psiandroid /bin/bash -c 'yes | /android-sdk-linux/tools/bin/sdkmanager --update && cd /go/src/bitbucket.org/psiphon/psiphon-circumvention-system/Android && ./gradlew assembleDebug'
docker run -v $REPO_DIR:/go/src/github.com/refraction-networking/gotapdance -v $GOPATH/src/bitbucket.org/psiphon/psiphon-circumvention-system/Android:/go/src/bitbucket.org/psiphon/psiphon-circumvention-system/Android refraction/psiandroid /bin/bash -c 'yes | /android-sdk-linux/tools/bin/sdkmanager --update && cd /go/src/bitbucket.org/psiphon/psiphon-circumvention-system/Android && ./gradlew assembleDebug'

cp $GOPATH/src/bitbucket.org/psiphon/psiphon-circumvention-system/Android/app/build/outputs/apk/debug/PsiphonAndroid-debug.apk build/PsiphonAndroid-CJ-debug.apk

pwd
echo "build/PsiphonAndroid-CJ-debug.apk"
15 changes: 15 additions & 0 deletions build/PsiphonCoreGradle.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff -r 00488348a5f0 Android/app/build.gradle
--- a/Android/app/build.gradle Tue Oct 22 15:38:52 2019 -0400
+++ b/Android/app/build.gradle Wed Oct 30 14:28:38 2019 -0600
@@ -40,6 +40,11 @@
release
}

+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
buildTypes {
debug {
pseudoLocalesEnabled true
34 changes: 34 additions & 0 deletions build/conjure.golang.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/psiphon/common/tapdance/tapdance.go b/psiphon/common/tapdance/tapdance.go
index de08e792..1df69252 100644
--- a/psiphon/common/tapdance/tapdance.go
+++ b/psiphon/common/tapdance/tapdance.go
@@ -40,6 +40,7 @@ import (
"github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common"
"github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/errors"
"github.com/armon/go-proxyproto"
+ refraction_networking_proto "github.com/refraction-networking/gotapdance/protobuf"
refraction_networking_tapdance "github.com/refraction-networking/gotapdance/tapdance"
)

@@ -327,8 +328,20 @@ func Dial(

manager := newDialManager(netDialer.DialContext)

+ registrar := refraction_networking_tapdance.APIRegistrar{
+ Endpoint: "https://registration.refraction.network/api/register",
+ ConnectionDelay: 750 * time.Millisecond,
+ MaxRetries: 3,
+ SecondaryRegistrar: refraction_networking_tapdance.DecoyRegistrar{},
+ }
+
tapdanceDialer := &refraction_networking_tapdance.Dialer{
- TcpDialer: manager.dial,
+ TcpDialer: manager.dial,
+ DarkDecoy: true,
+ UseProxyHeader: true,
+ Width: 5,
+ DarkDecoyRegistrar: registrar,
+ Transport: refraction_networking_proto.TransportType_Min,
}

// If the dial context is cancelled, use dialManager to interrupt
Binary file added build/tapdance/ClientConf
Binary file not shown.
Loading