Skip to content

OpenVPN ​

The CA placeholder is not a valid certificate and must be replaced. The server determines password and client-certificate requirements; supply valid authentication. Both forms can coexist, with cert and key supplied as a pair. Only dev: tun is supported, not TAP. Certificate and static-key fields take content rather than paths. Map the relevant .ovpn fields to YAML rather than pasting an entire .ovpn file into proxies.

Node example ​

Merge this node into the configuration’s proxies list. Replace example addresses, identities, and credentials. If you rename Node, update group references too.

yaml
proxies:
  - name: Node
    type: openvpn
    server: proxy.example.com
    port: 1194
    proto: udp
    username: YOUR_USERNAME
    password: YOUR_PASSWORD
    ca: |
      -----BEGIN CERTIFICATE-----
      REPLACE_WITH_CA_CERTIFICATE_BODY
      -----END CERTIFICATE-----

Protocol fields ​

FieldHow to configure it
protoudp or tcp, matching the .ovpn transport.
caCopy the complete certificate from the .ovpn <ca> block into a YAML block string.
username / passwordCredentials for auth-user-pass authentication.
cert / keyComplete <cert> and <key> content when the server requires client certificates.
tls-auth / key-directionStatic TLS authentication key and direction, when required.
tls-crypt / tls-crypt-v2Use the matching control-channel key from the source config; avoid mixing modes.
cipher / data-ciphersData cipher and negotiated cipher list from the service.
authAuthentication digest, default SHA256. It also selects the tls-auth control-channel HMAC digest; match the server's auth setting even when an AEAD data cipher is used.
data-ciphers-fallbackThe cipher used when no common one is negotiated with the server; copy the setting of the same name from the .ovpn file.
comp-lzoWhen the server uses compression, copy "no", "yes", or "adaptive" from the .ovpn file, quoted as text.
ping / ping-restart / handshake-timeoutPing, restart, and handshake timeouts in seconds.
ip-stackThe network stack inside this node. Starting with Clash for iOS and iPadOS 1.0.14, macOS 1.0.16, and tvOS 1.0.17, there is one network stack: mode set to auto, gvisor, or mips connects as usual and runs on it, and the app notes that the setting has no effect. congestion-controller picks TCP congestion control: cubic (default), reno, or bbr; bbr3 runs as bbr.

Groups and rules · Common fields · TLS · Transports

Reference: mihomo.

The tls-auth digest behavior was checked against Clash Core snapshot 7ea70d1.