Skip to content

Commit

Permalink
Merge pull request #682 from efryntov/remove-vpn-tun2socks
Browse files Browse the repository at this point in the history
Remove VPN and tun2socks code from Android library
  • Loading branch information
rod-hynes authored Oct 16, 2024
2 parents d16a328 + 2b264b8 commit dbacf60
Show file tree
Hide file tree
Showing 12 changed files with 165 additions and 627 deletions.
750 changes: 161 additions & 589 deletions MobileLibrary/Android/PsiphonTunnel/PsiphonTunnel.java

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion MobileLibrary/Android/PsiphonTunnel/libs/.gitignore

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -166,26 +166,11 @@ public void run() {
// NOTE: these are callbacks from the Psiphon Library
//----------------------------------------------------------------------------------------------

@Override
public String getAppName() {
return "TunneledWebView Sample";
}

@Override
public Context getContext() {
return this;
}

@Override
public Object getVpnService() {
return null;
}

@Override
public Object newVpnServiceBuilder() {
return null;
}

@Override
public String getPsiphonConfig() {
try {
Expand Down
4 changes: 0 additions & 4 deletions MobileLibrary/Android/make.bash
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ fi
mkdir -p build-tmp/psi
unzip -o psi.aar -d build-tmp/psi
yes | cp -f PsiphonTunnel/AndroidManifest.xml build-tmp/psi/AndroidManifest.xml
yes | cp -f PsiphonTunnel/libs/armeabi-v7a/libtun2socks.so build-tmp/psi/jni/armeabi-v7a/libtun2socks.so
yes | cp -f PsiphonTunnel/libs/arm64-v8a/libtun2socks.so build-tmp/psi/jni/arm64-v8a/libtun2socks.so
yes | cp -f PsiphonTunnel/libs/x86/libtun2socks.so build-tmp/psi/jni/x86/libtun2socks.so
yes | cp -f PsiphonTunnel/libs/x86_64/libtun2socks.so build-tmp/psi/jni/x86_64/libtun2socks.so
mkdir -p build-tmp/psi/res/xml
yes | cp -f PsiphonTunnel/ca_psiphon_psiphontunnel_backup_rules.xml build-tmp/psi/res/xml/ca_psiphon_psiphontunnel_backup_rules.xml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ - (void)handlePsiphonNotice:(NSString * _Nonnull)noticeJSON {
else if ([noticeType isEqualToString:@"ConnectedServerRegion"]) {
id region = [notice valueForKeyPath:@"data.serverRegion"];
if (![region isKindOfClass:[NSString class]]) {
[self logMessage:[NSString stringWithFormat: @"ActiveTunnel notice missing data.serverRegion: %@", noticeJSON]];
[self logMessage:[NSString stringWithFormat: @"ConnectedServerRegion notice missing data.serverRegion: %@", noticeJSON]];
return;
}
if ([self.tunneledAppDelegate respondsToSelector:@selector(onConnectedServerRegion:)]) {
Expand Down
3 changes: 1 addition & 2 deletions psiphon/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1039,8 +1039,7 @@ loop:

NoticeActiveTunnel(
connectedTunnel.dialParams.ServerEntry.GetDiagnosticID(),
connectedTunnel.dialParams.TunnelProtocol,
connectedTunnel.dialParams.ServerEntry.SupportsSSHAPIRequests())
connectedTunnel.dialParams.TunnelProtocol)

NoticeConnectedServerRegion(connectedTunnel.dialParams.ServerEntry.Region)

Expand Down
5 changes: 2 additions & 3 deletions psiphon/notice.go
Original file line number Diff line number Diff line change
Expand Up @@ -699,12 +699,11 @@ func NoticeRequestedTactics(dialParams *DialParameters) {
}

// NoticeActiveTunnel is a successful connection that is used as an active tunnel for port forwarding
func NoticeActiveTunnel(diagnosticID, protocol string, isTCS bool) {
func NoticeActiveTunnel(diagnosticID, protocol string) {
singletonNoticeLogger.outputNotice(
"ActiveTunnel", noticeIsDiagnostic,
"diagnosticID", diagnosticID,
"protocol", protocol,
"isTCS", isTCS)
"protocol", protocol)
}

// NoticeConnectedServerRegion reports the region of the connected server
Expand Down

0 comments on commit dbacf60

Please sign in to comment.