GitHunt
ON

onion108/onion-v2ray-subscription-to-clash-converter

A Clash config generator that generates clash config from V2Ray subscription links. (mirrored from https://codeberg.org/onion27/onion-v2ray-to-clash-config-converter, will be updated less frequently)

ONIONV2RAYSUB2CLASH

A tool to convert v2ray subscription links into clash config, so you can take your time to make love.

How to build

Just:

cargo build

And you're ready to go.

Windows users are not welcomed. We discourage building and porting the software to the Microsoft Windows operating system and don't make any warranty for the software to be running normally on that operating system.

How to use

ov2clash convert [-o output_file] path_to_your_template_file subscription_links...

You can pass arbitrary amount of subscription links after the path to your template file.
When output_file is omitted, the software will guess a name for the output file. But usually we recommend to provide output-file.

Template file syntax

We have a dedicated template syntax for generating clash config from your specified config template.
A template insert directive looks like this:

# tempinsert: <key>

Where <key> is the value to insert. We currently provides two keys, proxy_configs for generated configs, and proxy_names for the name field extracted from the generated configs, both represented in YAML. Since YAML has an indent based syntax, we will preserve the indent when inserting the content as well. The indent can be added before the #:

    # tempinsert: <key>

And then content inserted will keep the same indent as the directive:

    <actual_content_line0>
    <actual_content_line1>
    <actual_content_line2>
    <actual_content_line3>
    <actual_content_line4>

Languages

Rust100.0%

Contributors

Do What The F*ck You Want To Public License
Created November 14, 2025
Updated January 6, 2026