1. Serve the subscription
The simplest response: a Base64 list of links plus headers with user data.
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
profile-title: base64:TXlWUE4=
profile-update-interval: 12
subscription-userinfo: upload=0; download=1073741824; total=107374182400; expire=1798761600
support-url: https://t.me/my_vpn_bot
dmxlc3M6Ly91dWlkQDEuMi4zLjQ6NDQzP3NlY3VyaXR5PXJlYWxpdHkmLi4u2. Test it like the app does
curl -i -A "nya/2.8.5/Android/722837263881" \
-H "x-hwid: test-device-1" \
-H "x-device-os: Android" \
-H "x-ver-os: 14" \
-H "x-device-model: Pixel 8" \
https://sub.example.com/abc1233. Add the button
Put a link on the subscription page. Details and fallbacks are in links.
<a href="nya://add/https://sub.example.com/abc123">Add to nya</a>4. Check in the app
- Install nya from the download page.
- Tap plus and add the subscription.
- Make sure the title, traffic and expiry are shown and servers answer the ping test.
- Connect. If something goes wrong, open Settings → Diagnostics.