# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           golang 1.0

go.setup            github.com/v2fly/v2ray-core 5.14.1 v
revision            0
name                v2ray
categories          net security
license             MIT
maintainers         {@casouri gmail.com:casouri} {i0ntempest @i0ntempest} openmaintainer
description         A proxy server for bypassing network restrictions

long_description    V2Ray supports many protocols, including Socks, HTTP, Shadowsocks, \
                    VMess, and more. And each protocol may have its own transport, such as TCP, \
                    mKCP, WebSocket, etc. Better yet, V2Ray has built in obfuscation \
                    to hide traffic in TLS, and can run in parallel with web servers.

homepage            https://www.v2fly.org

checksums           ${distname}${extract.suffix} \
                        rmd160  680f6041ca452659aa86df66b93385f71a35f9d9 \
                        sha256  684e191b8a8188984ea911530e7ad8b9aa67ba036794f11e0f13962ca287e32b \
                        size    1034098

go.vendors          lukechampine.com/blake3 \
                        repo    github.com/lukechampine/blake3 \
                        lock    v1.2.1 \
                        rmd160  4829b22d13cacc81be0f83668b9ae19a44a254e9 \
                        sha256  609eb185cc846fa451ac16042d4ebb52b2ab09c72a34ea0cc686b5445776254c \
                        size    35056 \
                    h12.io/socks \
                        repo    github.com/h12w/socks \
                        lock    v1.0.3 \
                        rmd160  291bf328a15dedff3a621345f117bd4ddf573b1e \
                        sha256  389ce4196b8a33eef5ec0f578ab1068d4202a8edfa1b9d244445c770dee97c2e \
                        size    14650 \
                    gvisor.dev/gvisor \
                        repo    github.com/google/gvisor \
                        lock    b8a429915ff1 \
                        rmd160  981fb5a94260cbc9253e3e87c13a5772fe46453e \
                        sha256  86322d62145a49f8a9b4eb21ad6b64276b55c925413d9b70328173b3475113f8 \
                        size    12582180 \
                    gopkg.in/yaml.v3 \
                        lock    v3.0.1 \
                        rmd160  e85ac1368fb7f9ef945b7fd7bd608a1f0d261c12 \
                        sha256  f3ea6be3f405ec25f8799773355aba54f8831d11f5315a01155bdc69b92eca7b \
                        size    91208 \
                    gopkg.in/check.v1 \
                        lock    41f04d3bba15 \
                        rmd160  1e5543a8e6a3159296ee63e28cbde9931a04f6b3 \
                        sha256  c41575a73d10809f89b05ef9e783f2d53facdc6573697770d30efb05a9d2dc28 \
                        size    31612 \
                    google.golang.org/protobuf \
                        repo    github.com/protocolbuffers/protobuf-go \
                        lock    v1.31.0 \
                        rmd160  2a79f7c0fd76cecaf9c25e53ad925b9e8fb5f8dc \
                        sha256  57f5c0096053ab69a9a74f2d815d23a25d6a1efcfc2f21ed92d7d8acf38bbfb1 \
                        size    1312091 \
                    google.golang.org/grpc \
                        repo    github.com/grpc/grpc-go \
                        lock    v1.59.0 \
                        rmd160  ee8527aa4fff0e35da6c3b3c299689cadb7edc90 \
                        sha256  0546516799539e86e659b8f6475509b37e7a457465926c78e7c737c06f738f9a \
                        size    2010564 \
                    google.golang.org/genproto \
                        repo    github.com/googleapis/go-genproto \
                        lock    b8732ec3820d \
                        rmd160  fa5279efb0f579a111bd22cdaea02ad350ba415e \
                        sha256  c4aefae293f4a122b3d22030cb052f0270223c0cd98ec1b154ac775d0de23863 \
                        size    5916085 \
                    golang.org/x/tools \
                        lock    v0.14.0 \
                        rmd160  8c2031035d107806cf06339fd06c9062d8c83063 \
                        sha256  fdad88f96b2e0dbe71be6387380b603a05fb78895f13a3ff83194d2844e4b0d0 \
                        size    3552579 \
                    golang.org/x/time \
                        lock    v0.3.0 \
                        rmd160  1db54fc6608ef07cc574d51db48fabe595579ade \
                        sha256  2cc1d4590e17f17f5198c1b5a9f2830104bbd0427fb54a5374f6f7d3c6b35096 \
                        size    12217 \
                    golang.org/x/text \
                        lock    v0.14.0 \
                        rmd160  e26a72d542901d19f6dde4e07746f72206fb8701 \
                        sha256  ef54709caaafdd8b27ce3d5f7c53408f11bc5fd1688c1c4f328de8ed268b3188 \
                        size    8972503 \
                    golang.org/x/sys \
                        lock    v0.15.0 \
                        rmd160  84270c5ffe3cd1540ccf8b8f19120cbdb117f848 \
                        sha256  183f3870369e62e0ecaf378b5ef3d335e7fcebfd3ebfb81a0576b424a941476f \
                        size    1443915 \
                    golang.org/x/sync \
                        lock    v0.5.0 \
                        rmd160  510a82f4888a99756ad7287f8129821003540e2b \
                        sha256  7941823efeb75c83632f4a652286074917418f2539a05abf8fee6c09329711b3 \
                        size    17575 \
                    golang.org/x/net \
                        lock    v0.19.0 \
                        rmd160  7cb516789ee236318b05b60b001535270d2f8d9c \
                        sha256  255804d72a1c37f3acfb7da82fd59be46836017dff63aa5480cb61a892c9f7ac \
                        size    1479870 \
                    golang.org/x/mod \
                        lock    v0.13.0 \
                        rmd160  995441ddb549ed539535e747368a5e127e866921 \
                        sha256  c08f2ff1b105ebfd0d0686e8290c7a86670d4706fa783f2b3457423e5478d013 \
                        size    122050 \
                    golang.org/x/exp \
                        lock    515e97ebf090 \
                        rmd160  69e4509e243c413426cb8610b05834e6e8cb7c0c \
                        sha256  eeb99fe5b94d429c054b3dd295dc0ba5010423351e1187341e4c74588c5832b6 \
                        size    1633018 \
                    golang.org/x/crypto \
                        lock    v0.17.0 \
                        rmd160  b42d588c4aa930e1d70d67b75a9a3f20a613536e \
                        sha256  a559bc5b604090ff2ad6040e8207d79a969ff3017f9e61d2eb0df774ae3b47f4 \
                        size    1809435 \
                    go4.org/netipx \
                        repo    github.com/go4org/netipx \
                        lock    f1b76eb4bb35 \
                        rmd160  2cbe8f3f12581260e7b7bcc28171383b2210b61c \
                        sha256  24709ddf60077f7b0ae2c721b9d230476c3c6c248afbac32b2d0e46e53280195 \
                        size    22716 \
                    go.uber.org/mock \
                        repo    github.com/uber-go/mock \
                        lock    v0.3.0 \
                        rmd160  7b9b9c0ed439ec2b808aeb310ebc4d289b9393e0 \
                        sha256  30a2ef2baa396e828967ba03174ce59abb2ea71b7fa37f8dcd10656854b46dfd \
                        size    85881 \
                    go.starlark.net \
                        repo    github.com/google/starlark-go \
                        lock    9532f5667272 \
                        rmd160  1f4e468effce7c9a95a64f4a430c4756a9868b72 \
                        sha256  e0c0ba0164c19b54c37ed9368880a139af087e2b1c8ee1bea9c45d9ca6a43cdf \
                        size    275253 \
                    github.com/xtaci/smux \
                        lock    v1.5.24 \
                        rmd160  c1473ad7aeb35491772a031439b03710fe2f3061 \
                        sha256  54e4c220a077d6849e812f1e256a776e74f6dacb60d42e7ea484b42c92ed70b1 \
                        size    138491 \
                    github.com/lunixbochs/struc \
                        repo    github.com/xiaokangwang/struc \
                        lock    0e381172f248 \
                        rmd160  25e85f1faab9f0f8addd5a7e3af6960c5dec8d12 \
                        sha256  5053b2697752139257f598fd7a8d7bb9b4e1e72833a5ac1783685a97cd7571eb \
                        size    16211 \
                    github.com/xiaokangwang/VLite \
                        lock    cff95160a432 \
                        rmd160  f290d00ac323a89a45f4c7a7a508661eef03cc90 \
                        sha256  7fffd2b689126a73d054d87044a853afd32f6e0ebe42662da9ff8794966c4253 \
                        size    186973 \
                    github.com/vincent-petithory/dataurl \
                        lock    v1.0.0 \
                        rmd160  7ca9265612cfb9e6dde563d74e06fca9b188a3e2 \
                        sha256  4aae6cb73f46068289c415beaf5529c0212cf12b8cd7d3776548733eccb35f6a \
                        size    11594 \
                    github.com/v2fly/ss-bloomring \
                        lock    28617310f63e \
                        rmd160  761b61e00dc364aeb34f0291bea63c29d4d79d25 \
                        sha256  37bd8667b8f62fc979f7956e3e5b4ac3b294b590654cde51c386a0374b356d46 \
                        size    5707 \
                    github.com/v2fly/VSign \
                        lock    e2adc24bf848 \
                        rmd160  d3a77e34e06c1c47945a2c52c062eebf554765c5 \
                        sha256  9dfe839716da561fde853aec6a04352f8f487e29321bb156a02ddef95fdec43a \
                        size    9339 \
                    github.com/v2fly/BrowserBridge \
                        lock    0570fc1d7d08 \
                        rmd160  9c0aee77e864f9ecc85447971f9a33285ce03235 \
                        sha256  8669339da1b08918734f0ecc73878f5ce7dff1413a8827ede3b0a63653d4bc5c \
                        size    370373 \
                    github.com/stretchr/testify \
                        lock    v1.8.4 \
                        rmd160  8e1645055c9b1d8e117df7974034e74b7f600d27 \
                        sha256  6d0a77075bbe0f8f1c0cbed51dd4d174579db976fef39d9ae6b500aab8917d6a \
                        size    104469 \
                    github.com/seiflotfy/cuckoofilter \
                        lock    e3b120b3f5fb \
                        rmd160  7699af91e2a4961173755a54d119eb62d39966e9 \
                        sha256  ad6854c2d84a3c249f27f8c7636783db31e09fa0643a350f692dacefeb17d089 \
                        size    6831 \
                    github.com/secure-io/siv-go \
                        lock    5ff40651e2c4 \
                        rmd160  5523c3046f151adc3d53b5e37f4f877a3d2d2705 \
                        sha256  0bedda3b9f421e0500d855f405c9cf1f1cb6ab04930bccfb8907740fea377fa3 \
                        size    13829 \
                    github.com/riobard/go-bloom \
                        lock    cdc8013cb5b3 \
                        rmd160  516e59eed4200c50f09b4a4e32751cd59c37b02e \
                        sha256  27c2479459dd154b496a019d595bd2863d47b98f9d9c9e9b7c97125636685987 \
                        size    5502 \
                    github.com/refraction-networking/utls \
                        lock    v1.5.4 \
                        rmd160  4e0a71031e5fe1df1152a717cf41da0d63cc33ba \
                        sha256  47e7113a56888ee951032ec254e6141b097ad4b487146b60bcaebc9ea143a20a \
                        size    641772 \
                    github.com/quic-go/quic-go \
                        lock    v0.41.0 \
                        rmd160  02b615a0f8dbba0321c418d7516b5579a8e77086 \
                        sha256  6af12ad1394e69be2c906f0963144228a547ca6901adec630e184a50b3ba23e8 \
                        size    595751 \
                    github.com/pmezard/go-difflib \
                        lock    v1.0.0 \
                        rmd160  fc879bfbdef9e3ff50844def58404e2b5a613ab8 \
                        sha256  7cd492737641847266115f3060489a67f63581e521a8ec51efbc280c33fc991f \
                        size    11409 \
                    github.com/pires/go-proxyproto \
                        lock    v0.7.0 \
                        rmd160  317f60508124e8e4f053ea6e36814c2f8c35cd66 \
                        sha256  aaf1e68132d98518d113142c56fc99875c433cc13e84e0c43224875ea437e878 \
                        size    39692 \
                    github.com/pion/transport \
                        lock    v2.2.4 \
                        rmd160  ee3a1a1ee03bc18382489003e0b56ad40049ce46 \
                        sha256  94ed77f74e6e23af34328dba2aefc3892e6ee913beb2621b05458e961e93f478 \
                        size    88291 \
                    github.com/pion/sctp \
                        lock    v1.8.7 \
                        rmd160  8ce7ab65f809c3dbb6c70a269adc980ba0ac9be3 \
                        sha256  ef36087476da8ed7a2f0ce0345cd04e3d9685782220439fb4fcb9774f6592e78 \
                        size    86079 \
                    github.com/pion/randutil \
                        lock    v0.1.0 \
                        rmd160  21cb9a26b493e73bc12a368981e36652c366c06b \
                        sha256  dc6e48a6df14e670edb0bbe1f7b5a41cbdbc64757756ac0a0ff9da876d9e5c03 \
                        size    7522 \
                    github.com/pion/logging \
                        lock    v0.2.2 \
                        rmd160  851685cb668a4edd86d0811472f260f66f805f07 \
                        sha256  7e7b664fd81980acf6e9ae44328b0b6a83fb996675bcd0f277a437eb78382f5e \
                        size    6749 \
                    github.com/pion/dtls \
                        lock    v2.2.7 \
                        rmd160  21613982d7eed9b3f6fb0a84f3afbd3972e43a99 \
                        sha256  0c4d5836faef833bf4c9dbe023dfabfe7a6e92b1f3679517349a36976f51ae95 \
                        size    148953 \
                    github.com/phayes/freeport \
                        lock    95f893ade6f2 \
                        rmd160  d1fc5421ad2ca6cf03a0838e2b18b5704a32e956 \
                        sha256  eae7763d5bc66e629379a0c691a5543ccc8b76cf92bd79a4ccf555b023c2512f \
                        size    3355 \
                    github.com/pelletier/go-toml \
                        lock    v1.9.5 \
                        rmd160  82b54e63618f66f791ce83a86ec04b85b24daf96 \
                        sha256  335d53529bfead717c2c44454e05a2396918bba311e3262b8bcb295b7c8772fd \
                        size    106961 \
                    github.com/patrickmn/go-cache \
                        lock    v2.1.0 \
                        rmd160  9e869a3bd93bb2c8a59c96afc0d758ce0430df4f \
                        sha256  57bba72974dfe36ff8dc0003c51888746f34be75addbe18a97413d5830103844 \
                        size    13583 \
                    github.com/onsi/gomega \
                        lock    v1.27.7 \
                        rmd160  d9ff6131d5c5056c283f23b3659389831cbf48be \
                        sha256  a9184467650df16ca3618f39a695fdd225189a562037c9e4207d72c1b388d6d6 \
                        size    312098 \
                    github.com/onsi/ginkgo \
                        lock    v2.10.0 \
                        rmd160  7223a9a9f05e6276a10d6ec1d86cdfdbd5b34a5d \
                        sha256  db563e80643a7161bf07547668201630b39769c7240dbfb6572f9c61eb460616 \
                        size    625638 \
                    github.com/mustafaturan/monoton \
                        lock    v1.0.0 \
                        rmd160  9fed7b9af21f6181d42ab0cd53b4e74bc71a7286 \
                        sha256  08ec01e9b8d67065d5a4790c931bb75e59c85d80e11b5c38cebdb25e9280a201 \
                        size    15996 \
                    github.com/mustafaturan/bus \
                        lock    v1.0.2 \
                        rmd160  b9dcf85d4ff9c12b393f314eeb754fa32fe8abf2 \
                        sha256  35ce72077214c3ad793843df8c7a61d782bc381f72cff428f87ffb9d8c492bb5 \
                        size    13132 \
                    github.com/miekg/dns \
                        lock    v1.1.57 \
                        rmd160  69f6ddf16a8ee3ffe369205e1b0ce7d616292fe1 \
                        sha256  6a1729111cdb05abd1cbdd01014d906ea2298e14bee412b2221860ed01765654 \
                        size    213539 \
                    github.com/leodido/go-urn \
                        lock    v1.2.4 \
                        rmd160  adde1e8d4d0c58029468f6cd9f09d981c99f704a \
                        sha256  de5a91c24300af488be5ea314970525856dbd5a0932deb0a92dbd93a2ba1d5ce \
                        size    1105727 \
                    github.com/kr/text \
                        lock    v0.1.0 \
                        rmd160  0b3c78459e227170a3b80a0103d87a3eef77ed88 \
                        sha256  5ed970aad0da3cba3cffacdb4d154a162a8968655ee6d6f7b627e71b869efaf6 \
                        size    8691 \
                    github.com/kr/pretty \
                        lock    v0.1.0 \
                        rmd160  9aa7a5aad4c48840eecfd0f80186d1fb5ded0fd6 \
                        sha256  f6c3f89667c63e5b7f1fc6ee2c06b6a6bfdce88f3a965ccd395b64c6f95c9a47 \
                        size    8553 \
                    github.com/klauspost/reedsolomon \
                        lock    v1.11.7 \
                        rmd160  e56b53225ed6830fdcf6daa0be35611facffcda8 \
                        sha256  742881ef8f9920df1a838f243ce180781bd89e4af489bc5ed04ac7f1b0c03d59 \
                        size    347908 \
                    github.com/klauspost/cpuid \
                        lock    v2.2.5 \
                        rmd160  89c4d44312008cdcb6dc4bde13f584cf4090712d \
                        sha256  9f5b91aca8bda49eedfaba2a420497d44e65e6969794e156b7de74ce72398d2f \
                        size    456004 \
                    github.com/klauspost/compress \
                        lock    v1.16.7 \
                        rmd160  162f680e6687d5ff171d4723517732f771a7c37e \
                        sha256  cb4e88c1b926ab63793ac9069cc10d5a0ec2951f4f95ec9ae57098f893b94e69 \
                        size    37939327 \
                    github.com/jhump/protoreflect \
                        lock    v1.15.3 \
                        rmd160  b0fe039b269a38309a52a50e85684518a296fefb \
                        sha256  b749d37bd489aac856eba6ed7e1e8a67c1ab2a0322f6cf769c794eed8364dcf6 \
                        size    658432 \
                    github.com/h12w/go-socks5 \
                        lock    76189e178364 \
                        rmd160  f9edbe0fc88a462f7b2b68f96ebbf0d090d25a73 \
                        sha256  9d3c58b3d85dbcaed892e47999a957f9b55e9ce00db583d3ede20aaa0cba84fd \
                        size    8646 \
                    github.com/gorilla/websocket \
                        lock    v1.5.1 \
                        rmd160  f9ffbac88659f53e39985ff918cf381f777b3ca0 \
                        sha256  31409f67cd71a5d8ccd14772c6fceea8ac1ddcef865c5446313ab9ea32e7a29c \
                        size    61441 \
                    github.com/google/pprof \
                        lock    91b7bce49751 \
                        rmd160  73c27cf00fa596e77ab5a0aef50c96174a73e2c8 \
                        sha256  437cdc3f6ec266187ef2c903de73ef631749ce8009ed038b3c2404b5bb1dacb2 \
                        size    2950940 \
                    github.com/google/gopacket \
                        lock    v1.1.19 \
                        rmd160  4f1732d15d1f4057d37f8e8cdb6bbbcbd722cdd2 \
                        sha256  546027e7edd39388cd5a8f265e30ba921ed452889eceaaecbc1484f20b350a21 \
                        size    950824 \
                    github.com/google/go-cmp \
                        lock    v0.6.0 \
                        rmd160  2c9f5dab93f8a0895591466fe4a07c5dd9166ae2 \
                        sha256  0d550825fae514f8a947ab7e42fcb874f509d9cbfa3ad2711d7570a25f31571a \
                        size    104795 \
                    github.com/google/btree \
                        lock    v1.1.2 \
                        rmd160  eb1f3f67b53dab641253929ea27331535abc1169 \
                        sha256  313d9beb63d42ce7dd524c0d06f5be81d6ded1a0a667fb3e868129f4b9657ca0 \
                        size    19785 \
                    github.com/golang/protobuf \
                        lock    v1.5.3 \
                        rmd160  b4e09ad842f6dcd3aea36b28ec64d6d9563fd1d8 \
                        sha256  12e830fab630cabd279fca57e7089eeb1556e2c22b58eee64bb21bd3c8dfc706 \
                        size    171856 \
                    github.com/golang/mock \
                        lock    v1.6.0 \
                        rmd160  ed853462703f04ce365bb17b8c88a92994aa5006 \
                        sha256  4b107f6d26db03f8a36ae38f7b017399ed56571cdbf7b7ebc7bff0006c7dffb5 \
                        size    69263 \
                    github.com/go-task/slim-sprig \
                        lock    52ccab3ef572 \
                        rmd160  12ad1a072801a204a68c464918417611ec20f218 \
                        sha256  0f2045c6c2eb3042b20de955018ca01c0165ed205345312a5e7cb4d6f5254a36 \
                        size    39951 \
                    github.com/go-playground/validator \
                        lock    v10.16.0 \
                        rmd160  faeeb1b797f29ef82aaf346dce0b0603fb6ea45b \
                        sha256  25f71160580cabd7ff0627ad4f9064fe9ad4af6c12c80d8715815c8d49669825 \
                        size    252003 \
                    github.com/go-playground/universal-translator \
                        lock    v0.18.1 \
                        rmd160  db17dd09961812609699c2c30016db647c4e18b6 \
                        sha256  4613483514bc2df0f103c7ddbb32341fcf4335874063e967001ed150d1b05325 \
                        size    37150 \
                    github.com/go-playground/locales \
                        lock    v0.14.1 \
                        rmd160  762675a94ea6b0bb97d607041d41f9907e961a9e \
                        sha256  ea9d52236f0db72988de8dccc7cdba8162e7e27ba52d455a2c819d11ddef5a0b \
                        size    4365413 \
                    github.com/go-playground/assert \
                        lock    v2.2.0 \
                        rmd160  70d1eaf8695e149d6939fe76d9339f759bfef1b9 \
                        sha256  b71f6cdc47a13b84a9480491077fcddb6309c1cd64a446fb856cff623d31f392 \
                        size    4206 \
                    github.com/go-logr/logr \
                        lock    v1.2.4 \
                        rmd160  94910286621a7f24eba0cd12b63eead604ab601d \
                        sha256  2d804ca08d9e9d281dad5aa95e0a6595dc9f5b5e21cb5a923ba3356225d59e2d \
                        size    40539 \
                    github.com/go-chi/render \
                        lock    v1.0.3 \
                        rmd160  996a96ac2138ca409e8c0e6b98a294a17c0ecb6f \
                        sha256  d3cec85e8db8e92ab9e79e8c2342e7e37667f990bf537154a26c9d825eebeed9 \
                        size    6167 \
                    github.com/go-chi/chi \
                        lock    v5.0.10 \
                        rmd160  7560cd3ddac8c823138c02b287a6a04ec652f043 \
                        sha256  9f19ba411a62c2b1e5f3d09dd81d66378433683ecaf5210d5caae490c4f20f8e \
                        size    83658 \
                    github.com/gaukas/godicttls \
                        lock    v0.0.4 \
                        rmd160  17d7a2ce8acf33da86d6ecd32b4ae20d99f88fa8 \
                        sha256  a7298e5dbc6fc88895806aa723561b81994223e76775bef2719666c67900b262 \
                        size    19727 \
                    github.com/gabriel-vasile/mimetype \
                        lock    v1.4.2 \
                        rmd160  cd1c6e2098a351b444c62e4fd3f426bf8ce26766 \
                        sha256  47b2c8cf60fab4c2aa7712315d40e5a313c61981035116396c4c7bd0f532d54a \
                        size    24986451 \
                    github.com/ebfe/bcrypt_pbkdf \
                        lock    3c8d2dcb253a \
                        rmd160  b705ef4caeebacbd1acaad342b6f4738474bfcef \
                        sha256  ad6b7710f4b47c58f101b1958ce80a02e932b7e9217a52325b6664fa832281c9 \
                        size    15165 \
                    github.com/dgryski/go-metro \
                        lock    adc40b04c140 \
                        rmd160  e79b7a7ec524e4cecdd484d39b3028fcbd136ced \
                        sha256  6ef2364e3882754bd21a28c677bd00ec9c8d70990dd2c6d2b33edff605da4792 \
                        size    4513 \
                    github.com/davecgh/go-spew \
                        lock    v1.1.1 \
                        rmd160  7c02883aa81f81aca14e13a27fdca9e7fbc136f7 \
                        sha256  e85d6afa83e64962e0d63dd4812971eccf2b9b5445eda93f46a4406f0c177d5f \
                        size    42171 \
                    github.com/cloudflare/circl \
                        lock    v1.3.7 \
                        rmd160  98d536abbd648189637538028f7dd627a84d973e \
                        sha256  2e4e031b8bb07c992cc994480dd6c9d28fec6fa5e6bee68766349cf3c0917239 \
                        size    4938815 \
                    github.com/bufbuild/protocompile \
                        lock    v0.6.0 \
                        rmd160  68a7ccfb91aba42277feab06e8a61c3694f03ad2 \
                        sha256  686818f9246e007d3f5c8e282c82bd909de90489bbf010c3f295c99e8b22d16e \
                        size    385741 \
                    github.com/boljen/go-bitmap \
                        lock    23cd2fb0ce7d \
                        rmd160  52e0ef11d5b86f86d1cb4b880b6dd0b24647a05f \
                        sha256  75aa6659797b0152c33342fb3817c23e94a061692199dff79acbfa075bdf2eeb \
                        size    4495 \
                    github.com/andybalholm/brotli \
                        lock    v1.0.5 \
                        rmd160  cca1fc830f3e4e94a59017561f165370703a0247 \
                        sha256  92648c08eb495302a62985dc758a462ced98c46c5643ed87bd8282cf492dc406 \
                        size    1818147 \
                    github.com/ajg/form \
                        lock    v1.5.1 \
                        rmd160  5fceb031a406f7e01c35d0a60b5c65e8c9ee4750 \
                        sha256  22b2b5397f14e93fd4fa292c8de91a6283c7afcfb1254a2e3dba9fa61178386a \
                        size    14948 \
                    github.com/aead/cmac \
                        lock    7af84192f0b1 \
                        rmd160  a064c6f254039a50a12ff599b64635a425c83376 \
                        sha256  308b4e723a653b70168a73764af5cd02fba35db546fe51ea1e2dcac128d49480 \
                        size    6258 \
                    github.com/adrg/xdg \
                        lock    v0.4.0 \
                        rmd160  9a5eabbef937e0482168febd9fc3fc63ad61d6fd \
                        sha256  1a1276ed8071b21d00f417eff83dc3a77d4a7878e3064f117bc22421902e0cfe \
                        size    20032

# Notes for updating this port:
# Replace go.googlesource.com/protobuf with github.com/protocolbuffers/protobuf-go
# Replace google.golang.org/genproto/googleapis/rpc with google.golang.org/genproto
# Replace github.com/uber/mock with github.com/uber-go/mock
# Replace github.com/xiaokangwang/struc with github.com/xiaokangwang/struc and add the original line back as repo

post-extract {
    ln -s ${gopath}/src/github.com/quic-go ${gopath}/src/github.com/lucas-clemente
}

depends_build-append \
                    port:wget

build.env-append    CGO_ENABLED=0
build.args          -o ./v2ray
build.post_args     -ldflags '-s -w'
build.dir           ${worksrcpath}/main

destroot {
    xinstall -m 755 ${worksrcpath}/main/v2ray ${destroot}${prefix}/bin
    xinstall -d ${destroot}${prefix}/etc/v2ray
    xinstall -m 640 ${worksrcpath}/release/config/config.json ${destroot}${prefix}/etc/v2ray
    system -W ${destroot}${prefix}/bin "wget https://github.com/v2fly/geoip/raw/release/geoip.dat"
    system -W ${destroot}${prefix}/bin "wget https://github.com/v2fly/domain-list-community/raw/release/dlc.dat -O geosite.dat"
}

# until #2365 is implemented, manually handle config file
post-destroot {
    file rename ${destroot}${prefix}/etc/v2ray/config.json ${destroot}${prefix}/etc/v2ray/config.json.example
}

post-activate {
    if {![file exists ${prefix}/etc/v2ray/config.json]} {
        file copy ${prefix}/etc/v2ray/config.json.example ${prefix}/etc/v2ray/config.json
    }
}

startupitem.create          yes
startupitem.executable      ${prefix}/bin/v2ray run --config ${prefix}/etc/v2ray/config.json

notes "
    The default configuration file is copied to ${prefix}/etc/v2ray/config.json.\
    It is used by the startup item (service). You should edit or replace it.

    v2ctl utility has been removed in version 5. Its functionalities are now in\
    the main executable.
"
