Oblivion Documentation

repository·main·Indexed 26 days ago

https://github.com/bepass-org/oblivion

An unofficial Android client for Cloudflare Warp utilizing a custom Go implementation of WireGuard and bepass-sdk. Includes documentation for building the application and the tun2socks Android library (AAR), as well as API details for the tun2socks engine, including StartOptions configuration, engine control via Start() and Stop(), and log retrieval.

Tokens
959
Snippets
2
Records
7
Agent score
89%

What's inside Oblivion

  1. Build the tun2socks Android library (AAR)

    main

    To build the tun2socks Android library, you must use exactly Go version 1.22 due to dependencies in the psiphon library. The build process requires gomobile to generate an .aar file for Android integration.

    Follow these steps:

    1. Initialize gomobile.
    2. Bind the package to create the .aar file targeting Android API level 21.
    go run golang.org/x/mobile/cmd/gomobile init
    go run golang.org/x/mobile/cmd/gomobile bind -ldflags="-w -s" -target=android -androidapi=21 -o=tun2socks.aar .
  2. Build the Oblivion project

    main

    To build the Oblivion Android application from source, ensure you meet the following prerequisites and follow the Android Studio build process.

    Prerequisites

    • NDK: r26b (26.1.10909125)
    • Go: 1.22

    Build Steps

    1. Open the project in Android Studio.
    2. Navigate to Build in the menu bar.
    3. Select Generate Signed Bundle/APK....
    4. Choose APK and follow the remaining prompts to complete the build.
  3. Install and use Oblivion

    main

    Oblivion is an unofficial Cloudflare Warp client for Android that provides secure VPN access using a custom Go implementation of WireGuard and bepass-sdk.

    To use Oblivion:

    1. Download: Obtain the APK from the Releases page or install it via the Google Play Store.
    2. Connect: Launch the app and tap the switch button to establish a connection.
  4. Configure tun2socks using StartOptions

    main

    The StartOptions struct defines the configuration for the tun2socks engine.

    FieldTypeDescription
    TunFdintThe file descriptor of the TUN interface.
    PathstringThe working directory to change into before starting.
    FakeIPRangestringThe IP range used for fake IP addressing.
    VerboseboolIf true, sets the log level to slog.LevelDebug.
    BindAddressstringThe address and port to bind the socks server to (e.g., 0.0.0.0:1080).
    EndpointstringThe specific endpoint to connect to.
    LicensestringThe license key for the service.
    CountrystringThe country code used if PsiphonEnabled is true.
    PsiphonEnabledboolEnables Psiphon support.
    GoolboolConfiguration flag for Gool.
    DNSstringThe DNS server address to use.
    EndpointTypeintDetermines the endpoint scanning behavior: 0 (IPv4 & IPv6), 1 (IPv4 only), or 2 (IPv6 only).
    type StartOptions struct {
    	TunFd          int
    	Path           string
    	FakeIPRange    string
    	Verbose        bool
    	BindAddress    string
    	Endpoint       string
    	License        string
    	Country        string
    	PsiphonEnabled bool
    	Gool           bool
    	DNS            string
    	EndpointType   int
    }
  5. Start the tun2socks engine with Start()

    main
    Use the Start function to initialize and run the tun2socks engine. It requires a pointer to a StartOptions struct to configure the connection, DNS, and TUN interface. The function handles signal interception (SIGTERM, SIGINT) for graceful shutdown and manages internal logging.