Coder Social home page Coder Social logo

hongzhengdong / v2ray-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sagernet/v2ray-core

0.0 0.0 0.0 67.74 MB

A platform for building proxies to bypass network restrictions (for SagerNet :)

License: Other

Shell 0.23% Go 99.70% Assembly 0.03% Makefile 0.03% HTML 0.01%

v2ray-core's Introduction

Project V for SagerNet

Important changes

Rewritten DNS

  • added DNS Over TLS and QUIC support

example:

tls://dns.google
quic://dns.adguard.com

All available DNS schemes:

tcp
tcp+local
udp
udp+local
tls
tls+local
https
https+local
quic
quic+local
  • multiple DNS now share the cache.
  • concurrent query support
{
  "dns": [
    {
      "address": "tls://1.0.0.1",
      "concurrency": true
    }
  ]
}

Other

  • concurrency option for outbound observation
{
  "observatory": {
    "enableConcurrency": true
  }
}
  • DNS sniffer
{
  "routing": {
    "rules": [
      {
        "type": "field",
        "protocol": "dns",
        "outbound": "dns-out"
      }
    ]
  }
}
  • disableExpire dns option
{
  "dns": {
    "disableExpire": true
  }
}
  • removed FakeDNS
FakeDNS is a bad idea, and v2ray's current implementation
causes memory leaks, whether enabled or not.
  • wireguard outbound
WireGuard outbound supports proxy ping requests.
{
  "outbounds": [
    {
      "protocol": "wireguard",
      "settings": {
        "address": "engage.cloudflareclient.com",
        "localAddresses": [
          "<ipv4 address>",
          "<ipv6 address>"
        ],
        "peerPublicKey": "<public key>",
        "port": 2408,
        "preSharedKey": "<psk>",
        "privateKey": "<private key>",
        "mtu": 1500,
        "userLevel": 0
      }
    }
  ]
}
  • ssh outbound
{
  "outbounds": [
    {
      "protocol": "ssh",
      "settings": {
        "address": "<your ip>",
        "port": 22,
        "user": "root",
        "password": "<password or passphrase of private key>",
        "privateKey": "<x509 private key>",
        "publicKey": "<public key to verify server>",
        "clientVersion": "SSH-2.0-OpenSSH_114514 (random if empty)",
        "hostKeyAlgorithms": [
          "ssh-ed25519",
          "any u want"
        ],
        "userLevel": 0
      }
    }
  ]
}
  • add domainStrategy to outbound & preferIPv4/6 to domainStrategy
{
  "outbounds": [
    {
      "protocol": "shadowsocks",
      "settings": {
        ...
      },
      "domainStrategy": "AsIs/UseIP/UseIPv[4/6]/PreferIPv[4/6]"
    }
  ]
}
  • shadowsocks AEAD 2022 ciphers
{
  "outbounds": [
    {
      "protocol": "shadowsocks",
      "settings": {
        "servers": [
          {
            "address": "127.0.0.1",
            "port": 1234,
            "method": "2022-blake3-aes-128-gcm",
            "password": "<psk>"
          }
        ]
      }
    }
  ]
}
  • shadowsocks stream ciphers and xchacha-ietf-poly1305
supported cipher list:

none

2022-blake3-aes-128-gcm
2022-blake3-aes-256-gcm
2022-blake3-chacha20-poly1305

aes-128-gcm
aes-192-gcm
aes-256-gcm
chacha20-ietf-poly1305
xchacha20-ietf-poly1305

rc4
rc4-md5
aes-128-ctr
aes-192-ctr
aes-256-ctr
aes-128-cfb
aes-192-cfb
aes-256-cfb
aes-128-cfb8
aes-192-cfb8
aes-256-cfb8
aes-128-ofb
aes-192-ofb
aes-256-ofb
bf-cfb
cast5-cfb
des-cfb
idea-cfb
rc2-cfb
seed-cfb
camellia-128-cfb
camellia-192-cfb
camellia-256-cfb
camellia-128-cfb8
camellia-192-cfb8
camellia-256-cfb8
salsa20
chacha20
chacha20-ietf
xchacha20
  • shadowsocks SIP003 plugin
{
  "outbounds": [
    {
      "protocol": "shadowsocks",
      "settings": {
        ...
        "plugin": "path to plugin",
        "pluginOpts": "args;args2",
        "pluginArgs": [
          "--arg1=true"
        ]
      }
    }
  ]
}
  • embed v2ray-plugin for shadowsocks
{
  "outbounds": [
    {
      "protocol": "shadowsocks",
      "settings": {
        ...
        "plugin": "v2ray-plugin",
        "pluginOpts": "host=shadow.v2fly.org"
      }
    }
  ]
}
  • trojan_sing outbound

high performance trojan outbound.

notice: only the origin trojan (tls) protocol is supported.

{
  "outbounds": [
    {
      "protocol": "trojan_sing",
      "settings": {
        "address": "my.address",
        "serverName": "my.domain",
        "port": 443,
        "password": "my password",
        "insecure": false
      }
    }
  ]
}
  • route only sniffing option
Allows the sniffed domain to be used for routing only, 
without overriding the destination address. 
This improves the routing accuracy of AsIs, 
and provides the expected connection behavior of the client 
(not resolving the domain name again on the server side)
{
  "inbounds": [
    {
      ...
      "sniffing": {
        "destOverride": [
          "http",
          "tls",
          "quic"
        ],
        "enabled": true,
        "routeOnly": true
      },
      "tag": "socks"
    }
  ]
}
  • endpoint independent mapping support (aka full cone NAT)

for protocols other than v*ess, no configuration is required.

{
  "outbounds": [
    {
      "protocol": "v[m/l]ess",
      "settings": {
        "vnext": ...,
        "packetEncoding": "[none/packet/xudp]"
        // none: disabled
        // packet: requires v2ray/v2ray-core v5.0.2+ or SagerNet/v2ray-core
        // xudp: requires XTLS/Xray-core or SagerNet/v2ray-core
      },
      "mux": {
        "enabled": true,
        "packetEncoding": "[none/packet/xudp]"
        // packetEncoding for mux
      }
    }
  ]
}
  • ping proxy support
{
  "ping": {
    "protocol": "<default/unprivileged>",
    "gateway4": "<0.0.0.0>",
    "gateway6": "<::>",
    "disableIPv6": true
  }
}

protocol: udp connection with port 7.

  • XTLS protocol compatibility for vless and trojan

  • gRPC multi/raw mode

License

GPL v3

Credits

This repo relies on the following projects:

v2ray-core's People

Contributors

darienraymond avatar xiaokangwang avatar kslr avatar loyalsoldier avatar nekohasekai avatar rprx avatar dependabot[bot] avatar vcptr avatar sunshineplan avatar actions-user avatar akinokaede avatar vigilans avatar victoriaraymond avatar lucifer9 avatar yujinqiu avatar wuxiangzhou2010 avatar qjebbs avatar yuhan6665 avatar database64128 avatar rurirei avatar xymopen avatar toutyrater avatar darhwa avatar chinsyo avatar ducksoft avatar unknowndevqwq avatar calmlong avatar felixonmars avatar maskedeken avatar mzz2017 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.