Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Riverrun TCP Stream Modifier into V2Ray #2946

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

xiaokangwang
Copy link
Contributor

@xiaokangwang xiaokangwang commented Mar 22, 2024

Riverrun is a TCP Stream Modifier that try to reduce the entropy of traffics in order to bypass some kind of traffic classification, including the block of fully encrypted traffic. This version includes the simplest integration that use a seed to automatically derivate all parameters and apply the transformation to the entire stream.

The deterministic random number generator code is written by an author that is not personally known to us, with 2-BSD license. I think it is fine to include it, but in the worst case this part can be rewritten with a incompatible protocol change. Other codes are awaiting relicense confirmation from their authors.

To run one of its client:
v2ray run -format jsonv5 -c client.json

{
  "log": {
    "error": {
      "level": "Debug",
      "type": "Console"
    },
    "access": {
      "type": "None"
    }
  },
  "outbounds": [
    {
      "protocol": "vmess",
      "settings": {
        "port": 44122,
        "uuid": "480b5e93-a450-47d0-8a9a-cdac889488e5",
        "address": "127.0.0.1"
      },
      "streamSettings": {
        "transport": "tcp",
        "transportSettings": {
          "headerSettings": {
            "@type": "types.v2fly.org/v2ray.core.transport.internet.headers.riverrun.Config",
            "seed": "riverrun_64hw2d6o7tlupu9jufl3hr68kbwguewcg2rs"
          }
        }
      }
    }
  ],
  "inbounds": [
    {
      "protocol": "socks",
      "settings": {
        "udpEnabled": true,
        "address": "127.0.0.1",
        "packetEncoding": "Packet"
      },
      "port": 10808
    }
  ]
}

To run one of its client:
v2ray run -format jsonv5 -c client.json

{
  "log": {
    "error": {
      "level": "Debug",
      "type": "Console"
    },
    "access": {
      "type": "None"
    }
  },
  "outbounds": [
    {
      "protocol": "freedom"
    }
  ],
  "inbounds": [
    {
      "protocol": "vmess",
      "settings": {
        "users": [
          "480b5e93-a450-47d0-8a9a-cdac889488e5"
        ]
      },
      "port": 44122,
      "streamSettings": {
        "transport": "tcp",
        "transportSettings": {
          "headerSettings": {
            "@type": "types.v2fly.org/v2ray.core.transport.internet.headers.riverrun.Config",
            "seed": "riverrun_64hw2d6o7tlupu9jufl3hr68kbwguewcg2rs"
          }
        }
      }
    }
  ]
}

Note to self: squash on merge.

@xiaokangwang xiaokangwang added the Extensive Review Required Require an extensive review from organization owner, cannot be merged without owner approval label Mar 22, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 22, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 19.62617% with 86 lines in your changes missing coverage. Please review.

Project coverage is 35.56%. Comparing base (49b5068) to head (2028e56).
Report is 99 commits behind head on master.

Files with missing lines Patch % Lines
transport/internet/headers/riverrun/riverrun.go 2.27% 42 Missing and 1 partial ⚠️
transport/internet/headers/riverrun/config.pb.go 32.78% 39 Missing and 2 partials ⚠️
...port/internet/headers/riverrun/errors.generated.go 0.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2946      +/-   ##
==========================================
- Coverage   35.60%   35.56%   -0.05%     
==========================================
  Files         729      732       +3     
  Lines       41612    41719     +107     
==========================================
+ Hits        14818    14838      +20     
- Misses      25161    25246      +85     
- Partials     1633     1635       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

It has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the Stale label Jul 21, 2024
@github-actions github-actions bot closed this Jul 27, 2024
@xiaokangwang xiaokangwang reopened this Jul 27, 2024
@github-actions github-actions bot removed the Stale label Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Extensive Review Required Require an extensive review from organization owner, cannot be merged without owner approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants