From f36ae94d5190d3ab0d9c8e5a7515fc00ca512a36 Mon Sep 17 00:00:00 2001 From: Zer0 Date: Sun, 24 Nov 2024 17:06:29 +0100 Subject: [PATCH] fixed unsynced index.html --- opsec/v2ray_tutorial/index.html | 348 +++++++++++++++++++++++++++++--- 1 file changed, 324 insertions(+), 24 deletions(-) diff --git a/opsec/v2ray_tutorial/index.html b/opsec/v2ray_tutorial/index.html index 9324083..449a88b 100644 --- a/opsec/v2ray_tutorial/index.html +++ b/opsec/v2ray_tutorial/index.html @@ -142,6 +142,31 @@

+
  • +

    Clients

    + Android + + + Linux + + + Windows + + +

    +

    +
  • @@ -172,17 +197,174 @@

    Looking kinda complicated right, fear not we have Web-UI's to setup V2Ray servers. Web-UI aka "panels" could be used for user-management including traffic stats,uuid-generation and much more...

    - -
    
    -	
    -
    -

    - -
    
    -	
    -
    + + + @@ -190,31 +372,149 @@ -
    +
    -

    Using Cloudflare Workers



    -

    -
    
    -	
    -
    +

    Configuration

    +

    +

    + Setting up a v2ray server alone doesnt bypass any censors(it would be obvious if we push a large amount of traffic),rather we use some methods to make the traffic look geniune. +
    One such method is called Domain Fronting +
    + +

    + We will be using Fastly, since it offers a free CDN without CreditCard + 30-day Websocket support(free-trial) +
    + Start by creating an account at Fastly +
    + +
    + Create a new cdn service like this +
    + +

    + In here we can use any domain name since its for internal routing within cdn. +
    + (meaning that within the CDN domain zero-google.com will resolve to our v2ray IP ) +
    + origin willbe our v2ray inbound IP +
    +
    + then select the cdn name to edit the config +
    + +

    + We edit the CDN config to change the port of our host and disable some settings that may cause issues +
    + +
    + After that we change the port from 443 to 53254 (The port we used for receiving inbounds in our v2ray panel) + +

    +
    + We can do inbounds to port 443(TLS port) and adjust inbound settings to have Fallback but that requires one to have an inbound config with TCP transport within the panel. -

    -
    
    -	
    -
    - -

    -
    
    -	
    -
    +
    + TODO: Explain fallback above somewhere or here +

    + Now from Settings >> + +
    + we enable websocket. +
    + + Start the trial and it should look something like this +
    + +
    + Now lets add VCL for HTTP Connection Upgrade(Since we want to switch to Websocket) + +
    + +
    
    +if (req.http.Upgrade) {
    +return (upgrade);
    +}
    +                        
    +                        
    +

    +
    +
    +
    +
    +

    Testing Config

    + In this section we'll discuss how to connect to the prementioned setup using domain fronting technique. +
      +
    • +

      Linux

      +

      + Copy the server config from panel(by clicking the qr-code) to clipboard. +
      + Open client app(v2rayN/nekoray) +
      + Ctrl + V +
      + and edit it as follows. +
      + For testing in Linux we are using v2rayN +

      + +

      + click Confirm +

      + If the connection was successful you'll see your server IP along with delay(ms) in the logs as well as on bottom right corner like this. + +
      + You could toggle System Proxy to check connectivity, within browser and all. +
      + +
      +
      +
    • +
    • +

      Android

      +

      +
    +

    Testing Tor

    +

    +

    + go to + about:preferences#connection + change proxy settings as follows. +
    + (Proxy port shown in v2ray. + So that connection made by tor will go through v2ray server) + +
    +

    + If we were to save it and try to connect it will fail. + (connection died in state handshaking). + So enable Bridges +
    + Set Bridges of Your Choice +
    + +
    + Thats It! +

    + This is how the traffic leaves the system. +
    + +

    + As you could see, traffic goes to fastly server rather than tor nodes. +
    (Youre seeing Websocket traffic to and from 192.168.1.2(LAN IP) to a Fastly CDN(Anycast IP)) +

    +
    +
    +
    +