VPN key: what you've received and how to add it to an app

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:

WireGuard and OpenVPN configs: differences and importing

WireGuard uses a .conf file and authenticates with a key pair, with no username or password. OpenVPN uses .ovpn with certificates, keys and sometimes a login and password. The files are issued by the provider or administrator.

A key grants access to a server, while an account grants access to your dashboard, payments and renewals.

How to work out exactly what you've been sent

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 fileWhat it isWhat it contains or opensHow to add it
vless://VLESS linkAddress, port, user identifier and security parametersv2rayNG, v2rayN: clipboard or QR
ss://Static Shadowsocks key, including OutlineAddress, encryption method and passwordA compatible Shadowsocks client or Outline: import the key
ssconf://Dynamic Outline keyAddress of a file from which the client retrieves settings including the passwordOutline: add the key
https:// from a providerPossibly a subscription linkAccess to a list of servers with connection dataA compatible client: add the subscription URL
WireGuard .confTunnel configuration fileClient private key, server public key and settingsWireGuard: file, .zip archive or QR on a supported platform
.ovpnOpenVPN profileSettings, certificates and keys, or links to separate filesOpenVPN 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.

What is inside a key and a QR code?

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.

How does a subscription differ from a single key and an account?

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 haveWhere it is usedWhat happens when the provider makes changes
AccountDashboard, payments, renewalThe dashboard lets you obtain up-to-date access credentials
Single linkA connection profile in the clientIf the saved settings stop working, you will need a new link
Subscription linkA group of servers in the clientWhen 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.

How do I import the data I've received?

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:

  1. Install a suitable client from an official source: v2rayNG and v2rayN from the releases section of their projects on GitHub, WireGuard via the official website, and OpenVPN Connect from the OpenVPN website.
  2. Choose an import method: pasting a link from the clipboard, scanning a QR code, uploading a file or adding a subscription address.
  3. Refresh the server list if you have added a subscription.
  4. Select the profile you need (a saved set of connection settings).
  5. Turn the connection on.
  6. Check the connection status in the client.
  7. Compare your external IP address before and after connecting, if the browser is meant to work through the VPN.

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.

Where do I get a config, and will a generator help?

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.

What questions come up after importing?

Can I forward a key or subscription to someone else?

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.

Is the long string after ss:// encrypted?

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.

Can a second VPN disable the first one on Android?

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.

Where should you start once you have the key?

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.