How do I add a server or configuration to v2rayNG and v2rayN?
In v2rayNG on Android and v2rayN on PC (Windows, Linux, macOS), a server can be added from a link, a QR code or a file, while a list of servers is fetched via subscription.
VPN key: what you've received and how to add it to an app
A VPN key is an informal name for connection data in the form of a link, QR code or file. There is no single standard: a vless:// link is added to a compatible client, a WireGuard .conf file to WireGuard, and an .ovpn file to OpenVPN.
Updated:
A key grants access to a server, while an account grants access to your dashboard, payments and renewals.
Look at the start of the link or the file extension. A client is a program that connects using your settings. Like a key to a door, the format has to match the app.
| Start of link or file | What it is | What it contains or opens | How to add it |
|---|---|---|---|
vless:// | VLESS link | Address, port, user identifier and security parameters | v2rayNG, v2rayN: clipboard or QR |
ss:// | Static Shadowsocks key, including Outline | Address, encryption method and password | A compatible Shadowsocks client or Outline: import the key |
ssconf:// | Dynamic Outline key | Address of a file from which the client retrieves settings including the password | Outline: add the key |
https:// from a provider | Possibly a subscription link | Access to a list of servers with connection data | A compatible client: add the subscription URL |
WireGuard .conf | Tunnel configuration file | Client private key, server public key and settings | WireGuard: file, .zip archive or QR on a supported platform |
.ovpn | OpenVPN profile | Settings, certificates and keys, or links to separate files | OpenVPN Connect or another OpenVPN client: import the file |
However, an https:// link may lead to a dashboard or to an OpenVPN profile. Check the link type with the sender.
A config (configuration) is a set of connection settings, like a note with an address and entry rules. You may also come across JSON: text with named fields. Its structure must be compatible with the client.
Import from the clipboard, QR code, subscription and JSON is covered in the guide to v2rayNG and v2rayN. v2rayN accepts VMess, VLESS, Trojan, Shadowsocks and SOCKS links. For files, see the guide to WireGuard .conf and OpenVPN .ovpn.
A key contains the server address, access credentials and encryption parameters, or an address from which the client retrieves that information.
The VLESS scheme is: vless://uuid@server:port?parameters#name. The UUID is a user identifier, your pass to the server. Everything after the # is merely a label, like the engraving on a key fob.
However, vless:// does not guarantee encryption: security is determined by the parameters, such as TLS or REALITY. Do not change them at random.
A QR code is text recorded as an image. It encodes the same vless:// link for importing on a phone, or, for WireGuard, the configuration text. It contains the same secrets, so treat it like the link or file itself.
A subscription provides an updatable list of servers via a single link. An account gives access to the dashboard; a single key is a specific connection.
| What you have | Where it is used | What happens when the provider makes changes |
|---|---|---|
| Account | Dashboard, payments, renewal | The dashboard lets you obtain up-to-date access credentials |
| Single link | A connection profile in the client | If the saved settings stop working, you will need a new link |
| Subscription link | A group of servers in the client | When updated, the client downloads the current list |
A subscription is like the address of a directory: the address stays the same while the entries change. In v2rayNG and v2rayN, updating replaces the server list of the group. Auto-update works if the client supports it and it is enabled in the settings.
A dynamic Outline key also lets you switch servers without issuing a new key, but it does not necessarily contain a list of servers.
For an updatable list of servers, I recommend CitadelVPN: the dashboard issues a subscription link and individual VLESS links. Compatible clients: v2rayNG, Hiddify, NekoBox, Streisand, V2Box, Shadowrocket and Happ. Add the subscription link from the dashboard to your client, refresh the list and choose a connection.
However, OpenVPN may ask for a username and password when importing via URL or connecting: take them from the provider's instructions. With WireGuard, access is determined by keys; there is no login.
Use the clipboard, a QR code, a file or a subscription URL, according to the form of access you have received. The general procedure is as follows:
However, an IP address change only confirms the route of the request you checked, not that of every app on the device.
For example, an .ovpn file will not be accepted in a VLESS field. Import it into an OpenVPN client instead, then test the connection.
Obtain a config from your provider or administrator. OpenVPN Connect does not itself provide VPN access: you need a profile for a working server.
A config generator assembles a file from server parameters and client keys, like filling in a form. It does not create access: for example, the WireGuard server must know the corresponding client key.
A .zip archive is a package containing one or more configs. Do not send private keys to a random online generator.
Yes, the recipient receives the access credentials; whether they may use it depends on the terms of the service. It is better to set up separate access: never post keys, subscription links, files or screenshots of QR codes in public chats.
No. Often the method and password are written in base64, which is reversible encoding, like writing the same text in a different alphabet. Some subscriptions also transmit their list in base64, which the client decodes itself; so do not treat such a string as safe to publish.
Yes, only one VPN connection can be active at a time in a single Android profile. Starting a second one disables the first; simply saving a key without connecting does not.
Match the format to the client: vless:// for v2rayNG or an equivalent, a WireGuard .conf for WireGuard, an .ovpn for OpenVPN. Refresh the subscription after importing, then choose a server and connect. An account is needed for managing the service; a key, file and subscription are confidential connection data.