From 162b4d3a058d8136c19e2a3b44d7044e9292d7b8 Mon Sep 17 00:00:00 2001 From: cyBerta <cyberta@riseup.net> Date: Fri, 14 Jun 2024 17:47:38 +0200 Subject: [PATCH] remove deprecated shapeshifter library --- .gitmodules | 3 --- README.md | 4 ++-- build_core.sh | 16 ++++++---------- build_core_dev.sh | 12 ++++++------ go.mod | 9 +-------- shapeshifter | 1 - 6 files changed, 15 insertions(+), 30 deletions(-) delete mode 160000 shapeshifter diff --git a/.gitmodules b/.gitmodules index 185d8be..3c4a189 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "shapeshifter"] - path = shapeshifter - url = https://0xacab.org/leap/shapeshifter.git [submodule "IPtProxy"] path = IPtProxy url = https://0xacab.org/leap/android_libs/IPtProxy.git diff --git a/README.md b/README.md index a8833fb..3188c9b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ ### Bitmask Core This repository contains all golang dependencies currently used in Bitmask Android and custom branded versions of it: -* shapeshifter: a library, based on shapeshifter-dispatcher for VPN communication over obfs4 +* obfsvpn: a library containing different obfs4 based censorship circumvention transports * IPtProxy: a library wrapping snowflake client and snowflake proxy, forked from https://github.com/tladesignz/IPtProxy and adapted for our purposes -* pgpverify: a small library for verifying the inegrity of downloaded app updates (only used in apks distributed from a website) +* pgpverify: a small library for verifying the integrity of downloaded app updates (only used in apks distributed from a website) * motd: Message of the day library, shared between Bitmask Desktop and Mobile * more shared code between Bitmask Desktop and Mobile clients **(tbd.)** diff --git a/build_core.sh b/build_core.sh index 62c89e0..6d03569 100755 --- a/build_core.sh +++ b/build_core.sh @@ -108,10 +108,6 @@ patch --directory=IPtProxy --strip=1 < iptproxy.patch || quit showtitle "Removing go.mod and go.sum from obfsvpn" rm ./obfsvpn/go.mod ./obfsvpn/go.sum -# -------- preparing shapeshifter --------------- -showtitle "Removing go.mod and go.sum from shapeshifter" -rm ./shapeshifter/go.mod ./shapeshifter/go.sum - # -------- preparing motd --------------- showtitle "Removing go.mod and go.sum from motd (message of the day)" rm ./motd/go.mod ./motd/go.sum @@ -131,19 +127,19 @@ fi showtitle "Building Bitmask core as full aar" -gomobile bind -target='android' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore.aar org.0xacab/leap/bitmaskcore/shapeshifter org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd +gomobile bind -target='android' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore.aar org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd showtitle "Building Bitmask web core as full aar including pgpverify" -gomobile bind -target='android' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_web.aar -v org.0xacab/leap/bitmaskcore/pgpverify org.0xacab/leap/bitmaskcore/shapeshifter org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd +gomobile bind -target='android' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_web.aar -v org.0xacab/leap/bitmaskcore/pgpverify org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd showtitle "Building Bitmask core for armv7" -gomobile bind -target='android/arm' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm.aar -v org.0xacab/leap/bitmaskcore/shapeshifter org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd +gomobile bind -target='android/arm' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm.aar -v org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd showtitle "Building Bitmask core for x86" -gomobile bind -target='android/386' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86.aar -v org.0xacab/leap/bitmaskcore/shapeshifter org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd +gomobile bind -target='android/386' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86.aar -v org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd showtitle "Building Bitmask core for arm64" -gomobile bind -target='android/arm64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm64.aar -v org.0xacab/leap/bitmaskcore/shapeshifter org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd +gomobile bind -target='android/arm64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm64.aar -v org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd showtitle "Building Bitmask core for x86_64" -gomobile bind -target='android/amd64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86_64.aar -v org.0xacab/leap/bitmaskcore/shapeshifter org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd +gomobile bind -target='android/amd64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86_64.aar -v org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd diff --git a/build_core_dev.sh b/build_core_dev.sh index e62ffe4..1e80906 100755 --- a/build_core_dev.sh +++ b/build_core_dev.sh @@ -123,22 +123,22 @@ fi showtitle "Building Bitmask core as full aar" -gomobile bind -target='android' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore.aar org.0xacab/leap/bitmaskcore/shapeshifter org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd +gomobile bind -target='android' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore.aar -v org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd showtitle "Building Bitmask web core as full aar including pgpverify" -gomobile bind -target='android' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_web.aar -v org.0xacab/leap/bitmaskcore/pgpverify org.0xacab/leap/bitmaskcore/shapeshifter org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd +gomobile bind -target='android' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_web.aar -v org.0xacab/leap/bitmaskcore/pgpverify org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd showtitle "Building Bitmask core for armv7" -gomobile bind -target='android/arm' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm.aar -v org.0xacab/leap/bitmaskcore/shapeshifter org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd +gomobile bind -target='android/arm' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm.aar -v org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd showtitle "Building Bitmask core for x86" -gomobile bind -target='android/386' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86.aar -v org.0xacab/leap/bitmaskcore/shapeshifter org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd +gomobile bind -target='android/386' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86.aar -v org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd showtitle "Building Bitmask core for arm64" -gomobile bind -target='android/arm64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm64.aar -v org.0xacab/leap/bitmaskcore/shapeshifter org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd +gomobile bind -target='android/arm64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_arm64.aar -v org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd showtitle "Building Bitmask core for x86_64" -gomobile bind -target='android/amd64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86_64.aar -v org.0xacab/leap/bitmaskcore/shapeshifter org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd +gomobile bind -target='android/amd64' -ldflags="-s -w" -androidapi=21 -v -tags=netcgo -trimpath -o ./lib/bitmaskcore_x86_64.aar -v org.0xacab/leap/bitmaskcore/obfsvpn/client org.0xacab/leap/bitmaskcore/IPtProxy/IPtProxy.go org.0xacab/leap/bitmaskcore/motd if [[ "bitmask_android" == `pwd | rev | cut -d / -f 2 | rev` ]]; then showtitle "Copying to bitmask_android main repository" diff --git a/go.mod b/go.mod index 7e0284a..045fe3a 100644 --- a/go.mod +++ b/go.mod @@ -8,14 +8,6 @@ replace ( gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2 => ./IPtProxy/snowflake ) -require ( - git.torproject.org/pluggable-transports/goptlib.git v1.2.0 - // Do not update obfs4 past e330d1b7024b, a backwards incompatible change was - // made that will break negotiation. - gitlab.com/yawning/obfs4.git v0.0.0-20220904064028-336a71d6e4cf - gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2 v2.9.2 -) - require ( golang.org/x/crypto v0.21.0 golang.org/x/net v0.22.0 @@ -27,6 +19,7 @@ require ( github.com/kalikaneko/socks5 v1.0.1 github.com/xtaci/kcp-go v5.4.20+incompatible gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird v0.0.0-20240327102443-aab489105e97 + gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2 v2.9.2 golang.org/x/mobile v0.0.0-20230301163155-e0f57694e12c ) diff --git a/shapeshifter b/shapeshifter deleted file mode 160000 index de6cd36..0000000 --- a/shapeshifter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit de6cd3602e5b52cf0799ea81bde0eb58fe09d621 -- GitLab