<div dir="ltr"><div dir="ltr"><div>Currently, I'm using udp2raw-tunnel to transform wireguard udp traffic into raw tcp (config files as follows),<br>It's very stable on my home network than using wireguard alone,<br></div><div>But if we can integrate RAW TCP feature into wireguard, it would significantly improve performance and stability for end users.<br></div><div><br></div><br>from: <a href="https://gist.github.com/diyism/1b80903a83776675031c73ae499438d8#file-wireguard_config-txt-L145">https://gist.github.com/diyism/1b80903a83776675031c73ae499438d8#file-wireguard_config-txt-L145</a><br><br><div><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC146" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">$wget <a href="https://github.com/wangyu-/udp2raw-tunnel/releases/download/20180830.2/udp2raw_binaries.tar.gz">https://github.com/wangyu-/udp2raw-tunnel/releases/download/20180830.2/udp2raw_binaries.tar.gz</a></td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC147" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">$tar xzvf udp2raw_binaries.tar.gz</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC148" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">$sudo cp udp2raw_amd64 /usr/bin/</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC149" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">$sudo udp2raw_amd64 -c -l127.0.0.2:24448 -r<server ip>:24447 -a</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC150" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">$cat /etc/wireguard/wg0.conf</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC151" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">[Interface]</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC152" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">PrivateKey = <client privkey></td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC153" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">Address = <a href="http://10.0.0.3/32">10.0.0.3/32</a></td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC154" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">ListenPort = 24447</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC155" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">MTU = 1300</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC156" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">PostUp = ip route add <a href="http://10.0.0.0/24">10.0.0.0/24</a> dev wg0 && wg set wg0 peer <server pubkey> allowed-ips <a href="http://0.0.0.0/0">0.0.0.0/0</a></td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC157" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">PostDown = ip route del <a href="http://10.0.0.0/24">10.0.0.0/24</a> </td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC158" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
<br></td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC159" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">[Peer]</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC160" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">#10.0.0.1</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC161" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">PublicKey = <server pubkey></td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC162" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">Endpoint = <a href="http://127.0.0.2:24448">127.0.0.2:24448</a></td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC163" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">#AllowedIPs = <a href="http://0.0.0.0/0">0.0.0.0/0</a></td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC164" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
<br></td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC165" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">$sudo wg-quick down wg0 ; sudo wg-quick up wg0</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC166" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">$ping 10.0.0.1</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC167" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">64 bytes from <a href="http://10.0.0.1">10.0.0.1</a>: icmp_seq=2113 ttl=64 time=183 ms</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC168" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">$sudo ip route add <a href="http://104.24.0.0/16">104.24.0.0/16</a> dev wg0</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC169" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">$ping <a href="http://myip.ipip.net">myip.ipip.net</a></td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC170" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">PING <a href="http://myip.ipip.net">myip.ipip.net</a> (104.24.20.50) 56(84) bytes of data.</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC171" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">64 bytes from 104.24.20.50 (104.24.20.50): icmp_seq=1 ttl=60 time=185 ms</td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC172" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">$curl <a href="http://myip.ipip.net">http://myip.ipip.net</a></td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC173" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">IP:<server ip></td>
      </tr>
      <tr>
        </tr></tbody></table><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container"><tbody><tr><td id="gmail-file-wireguard_config-txt-LC174" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line">
<br></td>
      </tr>
      <tr>
        </tr></tbody></table>#take care, "MTU = 1300" in wg0.conf is 
needed when wireguard over udp2raw, or else most https requests will be 
blocked because of mtu problem.</div></div></div>