fix custom names in wbstream, fix ios gen script
This commit is contained in:
1 parent
a2abc08945
commit
08bfbdaed7
7 files changed
+44
-37
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
+38
-2
@@ -6,13 +6,49 @@ export PATH="$PATH:/opt/homebrew/bin:$HOME/go/bin"
|
|||||||
command -v go >/dev/null || { echo "go not found"; exit 1; }
|
command -v go >/dev/null || { echo "go not found"; exit 1; }
|
||||||
command -v gomobile >/dev/null || { echo "gomobile not found, run: go install golang.org/x/mobile/cmd/gomobile@latest"; exit 1; }
|
command -v gomobile >/dev/null || { echo "gomobile not found, run: go install golang.org/x/mobile/cmd/gomobile@latest"; exit 1; }
|
||||||
command -v gobind >/dev/null || { echo "gobind not found, run: go install golang.org/x/mobile/cmd/gobind@latest"; exit 1; }
|
command -v gobind >/dev/null || { echo "gobind not found, run: go install golang.org/x/mobile/cmd/gobind@latest"; exit 1; }
|
||||||
|
command -v xcodebuild >/dev/null || { echo "xcodebuild not found, install Xcode command line tools"; exit 1; }
|
||||||
|
|
||||||
ROOT="$(cd "$(dirname "$0")" && pwd)"
|
ROOT="$(cd "$(dirname "$0")" && pwd)"
|
||||||
cd "$ROOT/relay"
|
APP_BUILD_DIR="$ROOT/ios-proxy-app/build/Debug-iphoneos"
|
||||||
|
APP_PATH="$APP_BUILD_DIR/whitelist-bypass-proxy.app"
|
||||||
|
IPA_PATH="$ROOT/prebuilts/whitelist-bypass-proxy.ipa"
|
||||||
|
|
||||||
echo "Building gomobile .xcframework for iOS..."
|
echo "Building gomobile .xcframework for iOS..."
|
||||||
|
cd "$ROOT/relay"
|
||||||
rm -rf "$ROOT/ios-proxy-app/Mobile.xcframework"
|
rm -rf "$ROOT/ios-proxy-app/Mobile.xcframework"
|
||||||
gomobile bind -v -target=ios -o "$ROOT/ios-proxy-app/Mobile.xcframework" ./pion/ios/ 2>&1
|
gomobile bind -v -target=ios -o "$ROOT/ios-proxy-app/Mobile.xcframework" ./pion/ios/ 2>&1
|
||||||
|
|
||||||
echo "Done. Size:"
|
echo "xcframework size:"
|
||||||
du -sh "$ROOT/ios-proxy-app/Mobile.xcframework"
|
du -sh "$ROOT/ios-proxy-app/Mobile.xcframework"
|
||||||
|
|
||||||
|
echo "Building .app via xcodebuild..."
|
||||||
|
cd "$ROOT/ios-proxy-app"
|
||||||
|
rm -rf "$APP_BUILD_DIR"
|
||||||
|
xcodebuild \
|
||||||
|
-project whitelist-bypass-proxy.xcodeproj \
|
||||||
|
-scheme whitelist-bypass-proxy \
|
||||||
|
-configuration Debug \
|
||||||
|
-sdk iphoneos \
|
||||||
|
-destination 'generic/platform=iOS' \
|
||||||
|
CONFIGURATION_BUILD_DIR="$APP_BUILD_DIR" \
|
||||||
|
CODE_SIGNING_ALLOWED=NO \
|
||||||
|
CODE_SIGNING_REQUIRED=NO \
|
||||||
|
CODE_SIGN_IDENTITY="" \
|
||||||
|
build
|
||||||
|
|
||||||
|
echo "Packaging unsigned IPA..."
|
||||||
|
mkdir -p "$ROOT/prebuilts"
|
||||||
|
TEMP_DIR=$(mktemp -d)
|
||||||
|
trap 'rm -rf "$TEMP_DIR"' EXIT
|
||||||
|
mkdir -p "$TEMP_DIR/Payload"
|
||||||
|
cp -r "$APP_PATH" "$TEMP_DIR/Payload/"
|
||||||
|
|
||||||
|
codesign --remove-signature "$TEMP_DIR/Payload/whitelist-bypass-proxy.app/whitelist-bypass-proxy" 2>/dev/null || true
|
||||||
|
find "$TEMP_DIR/Payload/whitelist-bypass-proxy.app/Frameworks" -mindepth 2 -maxdepth 2 -type f ! -name "Info.plist" -exec codesign --remove-signature {} \; 2>/dev/null || true
|
||||||
|
|
||||||
|
rm -f "$IPA_PATH"
|
||||||
|
cd "$TEMP_DIR"
|
||||||
|
zip -r "$IPA_PATH" Payload/ -x "*.DS_Store"
|
||||||
|
|
||||||
|
echo "Created: $IPA_PATH"
|
||||||
|
echo "Size: $(du -h "$IPA_PATH" | cut -f1)"
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
||||||
APP_PATH="$SCRIPT_DIR/ios-proxy-app/build/Debug-iphoneos/whitelist-bypass-proxy.app"
|
|
||||||
IPA_PATH="$SCRIPT_DIR/prebuilts/whitelist-bypass-proxy.ipa"
|
|
||||||
TEMP_DIR=$(mktemp -d)
|
|
||||||
|
|
||||||
if [ ! -d "$APP_PATH" ]; then
|
|
||||||
echo "Error: .app not found at $APP_PATH"
|
|
||||||
echo "Build the project in Xcode first"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Creating unsigned IPA..."
|
|
||||||
|
|
||||||
mkdir -p "$TEMP_DIR/Payload"
|
|
||||||
cp -r "$APP_PATH" "$TEMP_DIR/Payload/"
|
|
||||||
|
|
||||||
codesign --remove-signature "$TEMP_DIR/Payload/whitelist-bypass-proxy.app/whitelist-bypass-proxy" 2>/dev/null || true
|
|
||||||
find "$TEMP_DIR/Payload/whitelist-bypass-proxy.app/Frameworks" -mindepth 2 -maxdepth 2 -type f ! -name "Info.plist" -exec codesign --remove-signature {} \; 2>/dev/null || true
|
|
||||||
|
|
||||||
cd "$TEMP_DIR"
|
|
||||||
zip -r "$IPA_PATH" Payload/ -x "*.DS_Store"
|
|
||||||
|
|
||||||
rm -rf "$TEMP_DIR"
|
|
||||||
|
|
||||||
echo "Created: $IPA_PATH"
|
|
||||||
echo "Size: $(du -h "$IPA_PATH" | cut -f1)"
|
|
||||||
@@ -26,7 +26,6 @@ if [ "$(uname)" = "Darwin" ]; then
|
|||||||
echo ""
|
echo ""
|
||||||
echo "=== Building iOS app ==="
|
echo "=== Building iOS app ==="
|
||||||
"$ROOT/build-ios.sh"
|
"$ROOT/build-ios.sh"
|
||||||
"$ROOT/build-ipa.sh"
|
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Skipping iOS build (requires macOS) ==="
|
echo "=== Skipping iOS build (requires macOS) ==="
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"whitelist-bypass/relay/common"
|
"whitelist-bypass/relay/common"
|
||||||
@@ -134,9 +135,9 @@ func JoinRoom(client *http.Client, accessToken, roomID string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func GetRoomToken(client *http.Client, accessToken, roomID, displayName string) (string, error) {
|
func GetRoomToken(client *http.Client, accessToken, roomID, displayName string) (string, error) {
|
||||||
url := fmt.Sprintf("%s/api-room-manager/api/v1/room/%s/token?deviceType=PARTICIPANT_DEVICE_TYPE_WEB_DESKTOP&displayName=%s",
|
tokenURL := fmt.Sprintf("%s/api-room-manager/api/v1/room/%s/token?deviceType=PARTICIPANT_DEVICE_TYPE_WEB_DESKTOP&displayName=%s",
|
||||||
APIBase, roomID, displayName)
|
APIBase, roomID, url.QueryEscape(displayName))
|
||||||
req, err := http.NewRequest(http.MethodGet, url, nil)
|
req, err := http.NewRequest(http.MethodGet, tokenURL, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
@@ -184,8 +185,8 @@ func KickParticipant(client *http.Client, accessToken, roomID, participantID str
|
|||||||
if client == nil {
|
if client == nil {
|
||||||
client = http.DefaultClient
|
client = http.DefaultClient
|
||||||
}
|
}
|
||||||
url := fmt.Sprintf("%s/api-room-manager/api/v1/room/%s/participant/%s/kick", APIBase, roomID, participantID)
|
kickURL := fmt.Sprintf("%s/api-room-manager/api/v1/room/%s/participant/%s/kick", APIBase, roomID, participantID)
|
||||||
req, err := http.NewRequest("DELETE", url, strings.NewReader("{}"))
|
req, err := http.NewRequest("DELETE", kickURL, strings.NewReader("{}"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user