GridHunter Android

Developer Documentation

Integration reference for subscription providers, profile generators and tools that need to produce configuration accepted by the GridHunter Android client.

Package com.gridhunter.vpnFirst Play release 1.0.0Runtime Xray CorePlatform Android 8.0+

Overview

GridHunter accepts managed subscription URLs, individual proxy share links, QR codes and raw Xray JSON profiles. Imported content is converted into an Android VpnService runtime configuration backed by Xray Core.

Subscription URL

Any HTTP or HTTPS URL can be imported as a subscription source. GridHunter downloads the response and detects supported share links, Base64 subscriptions or JSON automatically.

HTTP / HTTPS

Share links

Individual links can be pasted from the clipboard or scanned from a QR code. Supported schemes are VLESS, VMess, Trojan, Shadowsocks, Hysteria2, SOCKS5 and WireGuard.

Clipboard / QR

Xray JSON

GridHunter accepts a raw JSON object or array. Existing routing, observatory and balancer structures are preserved when the profile needs to remain a complete Xray configuration.

application/json

Local overrides

DNS, MTU, IPv6, per-app bypass and local routing preferences are applied only at runtime. GridHunter does not rewrite the original subscription or source profile.

Runtime only

Subscription feeds

A subscription endpoint can return plain share links, Base64-encoded share links or JSON. GridHunter sends an Accept header compatible with both text and JSON.

Plain text response

Return one supported link per line.

vless://UUID@example.net:443?type=xhttp&security=reality&sni=example.net#Finland
trojan://PASSWORD@example.net:443?type=grpc&security=tls&sni=example.net#Poland
Base64 response

The complete text subscription may be encoded using standard Base64, URL-safe Base64 or MIME Base64. Padding is optional.

The decoded value must contain at least one supported share-link scheme or a JSON object/array.
JSON response

A response beginning with { or [ is parsed as an Xray JSON profile or an array of profiles.

Use JSON when you need multiple outbounds, routing rules, balancers, observatory configuration or GridHunter display metadata in a structured form.

Subscription metadata headers

Subscription providers can add optional response metadata without modifying the body.

HeaderPurposeEncoding
profile-titleSubscription/group title displayed by GridHunter.Plain text or base64:<payload>
announceOptional announcement associated with the subscription.Plain text or base64:<payload>
Subscription-UserinfoProvider-supplied subscription usage/status information.Plain text or base64:<payload>
HTTP/1.1 200 OK
Content-Type: application/json
profile-title: GridHunter Top
announce: Welcome to GridHunter
Subscription-Userinfo: upload=0; download=0; total=0
VLESS

Standard VLESS URI syntax is supported. The user part must be a valid UUID.

vless://UUID@host:443?type=xhttp&security=reality&sni=host&fp=chrome&pbk=PUBLIC_KEY&sid=SHORT_ID#Server%20Name
ParameterNotes
typeTransport. See Supported transports.
securityCommon values: reality, tls, none.
sniTLS/Reality server name.
fpClient fingerprint when used by the selected security mode.
pbkReality public key.
sidReality short ID.
spxReality SpiderX value where applicable.
extraJSON object, either URL-encoded JSON or decoded JSON text.
VMess

VMess uses the conventional Base64-encoded JSON format.

vmess://BASE64({
  "v":"2",
  "ps":"Server name",
  "add":"example.net",
  "port":"443",
  "id":"UUID",
  "scy":"auto",
  "net":"websocket",
  "tls":"tls",
  "sni":"example.net",
  "fp":"chrome",
  "path":"/ws",
  "host":"example.net"
})

Recognized fields include add, port, id, ps, scy, net, tls, sni, fp, path, host, type and alpn.

Trojan
trojan://PASSWORD@example.net:443?type=grpc&security=tls&sni=example.net#Server

TLS is used by default when security is not specified. A non-empty flow parameter is rejected.

Shadowsocks

Both common SIP002 layouts are accepted.

ss://BASE64(method:password)@example.net:8388#Server

ss://BASE64(method:password@example.net:8388)#Server
Shadowsocks plugin links are not supported. A non-empty plugin parameter is rejected.
Hysteria2
hysteria2://AUTH@example.net:443?sni=example.net&insecure=0#Server
hy2://AUTH@example.net:443?sni=example.net#Server

GridHunter currently supports ordinary single-port Hysteria2 links.

Advanced obfuscation, multi-port/port hopping and bandwidth parameters such as obfs, mport, ports, up and down are intentionally rejected instead of being silently ignored.
SOCKS / SOCKS5
socks5://example.net:1080#Anonymous
socks5://USER:PASSWORD@example.net:1080#Authenticated

Anonymous and username/password SOCKS profiles are supported.

WireGuard

GridHunter uses a compact WireGuard share-link representation. Private and peer public keys must decode to 32-byte WireGuard keys.

wireguard://PRIVATE_KEY@example.net:51820?publickey=PEER_PUBLIC_KEY&address=10.0.0.2/32&mtu=1420&keepalive=25#Server
ParameterNotes
publickeyRequired peer public key.
presharedkeyOptional preshared key.
addressOptional comma-separated interface CIDR values.
mtuOptional value from 576 to 65535.
keepaliveOptional value from 0 to 65535.
reservedOptional three comma-separated byte values from 0 to 255.

Xray JSON profiles

GridHunter accepts a single JSON object or an array of JSON objects.

Supported proxy outbounds
vlessvmesstrojanshadowsockssockshysteriawireguard

A full config containing routing, observatory, burstObservatory or a routing balancer is kept as a complete profile. Simple configs may be exposed as individual connection profiles when this is safe.

Display metadata

GridHunter derives profile/group names from fields such as remarks, profile.title, display_name, outbound tags and route declarations.

For GridHunter-generated JSON, route metadata may include inbound_name, country, country_flag, display_emoji, target_type and target_tag.

Supported transports

Transport aliases are normalized by the client.

InputNormalized transport
raw, tcp, emptyraw
ws, websocketwebsocket
grpcgrpc
httpupgradehttpupgrade
xhttp, splithttp, httpxhttp
kcp, mkcpmkcp

Routing

Subscription authors can provide normal Xray routing. GridHunter also has user-controlled local routing that is applied after import without rewriting the source.

Russian services direct

Optional local bypass for Russian destinations. Disabled by default.

LAN/private direct

Optional direct route for private/local networks. Disabled by default.

Custom rules

Domain exact, suffix, keyword and IP/CIDR rules can target VPN, Direct or Block.

Per-app bypass

Android applications can be excluded from VpnService locally by the user.

Providers should not assume that a subscription's routing is the only routing layer. User-defined local rules may intentionally override general routing behavior.

Diagnostics and privacy

Diagnostic tooling is designed for network troubleshooting rather than user-content inspection.

GridHunter diagnostics may measure DNS/HTTPS timings, public IP checks, VPN/Xray status, route health, traffic counters and technical error metadata.

Raw logs are opt-in. Remote diagnostic correlation and report upload require explicit user consent and are off by default for each diagnostics screen launch.

Diagnostic tooling does not collect messages, contacts, files, screenshots, browser history, notification content or private application data.

Compatibility notes

Hysteria2

Single-port links only. Obfuscation and port hopping are not supported.

Shadowsocks

Native method/password profiles are supported; plugin links are rejected.

WireGuard

Uses GridHunter's compact share-link schema or native Xray JSON.

Not supported

AmneziaWG, SSR and TUIC are outside the current Android import scope.

Examples

Use placeholders when publishing examples. Never expose real credentials or private keys.

Minimal mixed subscription
vless://UUID@fi.example.net:443?type=xhttp&security=reality&sni=fi.example.net&fp=chrome&pbk=PUBLIC_KEY&sid=01#Finland
trojan://PASSWORD@pl.example.net:443?type=grpc&security=tls&sni=pl.example.net#Poland
socks5://user:password@proxy.example.net:1080#SOCKS5
Subscription response with metadata
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
profile-title: GridHunter Top
announce: Maintenance window on Sunday

vless://UUID@fi.example.net:443?type=xhttp&security=reality#Finland
vless://UUID@pl.example.net:443?type=raw&security=reality#Poland

Android application reference

ApplicationGridHunter
Package IDcom.gridhunter.vpn
VPN APIAndroid VpnService
RuntimeXray Core through libv2ray
Minimum AndroidAndroid 8.0 / API 26
Current Play targetAPI 36
First Google Play release1.0.0 / versionCode 1100
No documentation sections match your search.

This page documents the current GridHunter Android import and runtime contract. Unsupported fields should not be assumed to be ignored: some unsupported formats are rejected intentionally to avoid producing a connection that appears valid but behaves differently from the source configuration.