🛡️ VPN Facebook Zero rated Gateway Tunneling, Reverse Proxy

Please I need help making the Freebasics Facebook gateway to open and pass through my relay to my backend but it's giving 400 bad request. There's another way of doing this method using those Facebook proxies and Payload it's slow and proxy are bad, I'm trying to tunnel through internet.org/get_http gateway since it's zero-rated, my VPN app will use some relay:

#!/data/data/com.termux/files/usr/bin/bash
set -euo pipefail

GATEWAY_URL="${GATEWAY_URL:-http://www.internet.org:80/get_http}"
ORIGIN_URL="${ORIGIN_URL:?Set the profile origin_url}"
ORIGIN_HOST="${ORIGIN_HOST:?Set the host from origin_url}"
TARGET_URL="${TARGET_URL:?Set the exact target URL, including its path and query}"
BSID="${BSID-}"
FBS_TOKEN="${FBS_TOKEN-}"
SERVICE_ID="${SERVICE_ID-}"
USER_AGENT="${USER_AGENT:-Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36 Chrome/120.0.0.0 Mobile Safari/537.36}"
BODY_FILE="${BODY_FILE-}"

args=(
--http1.1 --max-time 45 --verbose --include
--request POST "$GATEWAY_URL"
-H 'Content-Type: application/octet-stream'
-H 'Accept: /'
-H 'Accept-Encoding: gzip, deflate'
-H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8'
-H 'Connection: close'
-H "Referer: ${ORIGIN_URL%/}/"
-H 'Sec-IOrg: 1'
-H "User-Agent: $USER_AGENT"
-H 'X-Requested-With: com.freebasics'
-H "X-IOrg-BSID: $BSID"
-H 'X-IOrg-HTTP-Method: POST'
-H "X-IOrg-Original-Host: $ORIGIN_HOST"
-H "X-IOrg-Target-URL: $TARGET_URL"
)

if [[ -n "$FBS_TOKEN" ]]; then
args+=(-H "X-IOrg-FBS-Auth-Token: $FBS_TOKEN")
fi
if [[ -n "$SERVICE_ID" ]]; then
args+=(-H "X-IOrg-Service-ID: $SERVICE_ID")
fi
if [[ -n "$BODY_FILE" ]]; then
args+=(--data-binary "@$BODY_FILE")
else
args+=(--data-binary '')
fi

curl "${args[@]}"


I don't know if the problem is with my headers or the origin target. But the gateway must open first not get 400 bad request, or maybe it's fine. The target domain is also listed on the freebasics app for zero rating
 

About this Thread

  • 0
    Replies
  • 0
    Views
  • 1
    Participants
Last reply from:
Christopher33

Online now

Members online
336
Guests online
14,202
Total visitors
14,538

Forum statistics

Threads
2,363,331
Posts
29,419,977
Members
1,053,701
Latest member
tamilmobile
Back
Top