Migrate your v2ray configuration into sing-box

  • By Project S
  • Last update: Aug 12, 2023
  • Comments: 3

v2box

Migrate your v2ray configuration into sing-box.

Usage

v2box migrate -c /path/to/v2ray-config.json > config.json
v2box migrate geoip -i /path/to/geoip.dat -o geoip.db
v2box migrate geosite -i /path/to/geosite.dat -o geosite.db

TODO

  • Inbound
  • Outbound
  • Routing Rule
  • DNS
  • Convert geo resources
  • Xray support

Download

v2box.zip

Comments(3)

  • 1

    Bump github.com/cloudflare/circl from 1.2.1-0.20221019164342-6ab4dfed8f3c to 1.3.3

    Bumps github.com/cloudflare/circl from 1.2.1-0.20221019164342-6ab4dfed8f3c to 1.3.3.

    Release notes

    Sourced from github.com/cloudflare/circl's releases.

    CIRCL v1.3.3

    New Features

    • ASCON light-weight authenticated encryption.
    • Hybrid KEM for HPKE based on Kyber and X25519.
    • CIRCL can be compiled both as static and dynamic linking modes.

    Security

    • Fixes error-handling on rand readers.

    What's Changed

    New Contributors

    Full Changelog: https://github.com/cloudflare/circl/compare/v1.3.2...v1.3.3

    CIRCL v1.3.2

    What's Changed

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
  • 2

    the result of converting geoip aren't loaded for some geoip

    i am trying to use custom geo converted with v2box, i want to use geoip telegram and geoip doh but the log from sing-box won't load it.

    +0700 2023-04-29 16:29:14 INFO router: loaded geoip database: 0 codes
    +0700 2023-04-29 16:29:14 INFO router: loaded geosite database: 1403 codes
    

    i have try sing-box-geo it's load normally i guess, but geoip doh somehow aren't works for blocking lists IP address DoH/DoQ

    +0700 2023-04-29 16:31:20 INFO router: loaded geoip database: 261 codes
    +0700 2023-04-29 16:31:24 INFO router: loaded geosite database: 1403 codes
    

    does sing-box support only 2 letter country code + private?

  • 3

    Panic error raised by protobuf due to namespace conflict

    input config includes only inbound, outbound and routing objects.

    Command:

    ./v2box migrate -c input.json > output.json
    

    Error:

    panic: proto: file "common/log/log.proto" is already registered
            previously from: "github.com/v2fly/v2ray-core/v5/common/log"
            currently from:  "github.com/xtls/xray-core/common/log"
    See https://protobuf.dev/reference/go/faq#namespace-conflict
    
    
    goroutine 1 [running]:
    google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x1a70700?, 0xc000460fc0?}, {0x1a70700?, 0xc000461000})
            /home/admin/go/pkg/mod/google.golang.org/[email protected]/reflect/protoregistry/registry.go:56 +0x1ee
    google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(0xc000012180, {0x1a96a88?, 0xc00046da40?})
            /home/admin/go/pkg/mod/google.golang.org/[email protected]/reflect/protoregistry/registry.go:130 +0x39f
    google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x1496fb2, 0x24}, {0x2596d20, 0xc6, 0xc6}, 0x1, 0x0, 0x0, 0x0, {0x1a78d90, ...}, ...})
            /home/admin/go/pkg/mod/google.golang.org/[email protected]/internal/filedesc/build.go:112 +0x1d6
    google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x1496fb2, 0x24}, {0x2596d20, 0xc6, 0xc6}, 0x1, 0x0, 0x0, 0x0, {0x0, ...}, ...}, ...})
            /home/admin/go/pkg/mod/google.golang.org/[email protected]/internal/filetype/build.go:138 +0x1b8
    github.com/xtls/xray-core/common/log.file_common_log_log_proto_init()
            /home/admin/go/pkg/mod/github.com/xtls/[email protected]/common/log/log.pb.go:138 +0x198
    github.com/xtls/xray-core/common/log.init.0()
            /home/admin/go/pkg/mod/github.com/xtls/[email protected]/common/log/log.pb.go:120 +0x17