diff --git a/.gitmodules b/.gitmodules index 185d8be6f8cc31b43bd385e5dbb0bd82df344cfd..3c4a189cd9e5466330a7309a74836d215e1e99ac 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 a8833fbac3ff1d3f6e3745c5bee31c0509463f6c..3188c9b72152f31ac498d1db4f67ff6138bd2f7f 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 62c89e0e39949835378db4a4c232546c0c2f1377..6d03569f320c38149d4905127735e266321add4e 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 e62ffe45d5567259bbc5d0a978acff0baf1ef86c..1e80906ac4e6a9447a4a3db9fd66d3e67e92d885 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 7e0284a60c45f81bf0d88feb974a6f9e3d17c9e8..045fe3a492381929fb31ca6813a94fa2f31dbf2e 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 de6cd3602e5b52cf0799ea81bde0eb58fe09d621..0000000000000000000000000000000000000000 --- a/shapeshifter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit de6cd3602e5b52cf0799ea81bde0eb58fe09d621