From 334c0e45dbaa67e59426eeadb6682886b6b6b7e3 Mon Sep 17 00:00:00 2001 From: Akilan Selvacoumar Date: Tue, 12 Oct 2021 16:48:33 +0400 Subject: [PATCH] added more to the draft for escaping NAT using reverse proxy servers --- content/technicalposts/P2PRC-Escaping-NAT.md | 73 +++++++++++++++++++- 1 file changed, 70 insertions(+), 3 deletions(-) diff --git a/content/technicalposts/P2PRC-Escaping-NAT.md b/content/technicalposts/P2PRC-Escaping-NAT.md index 21a7821d..af2734dc 100644 --- a/content/technicalposts/P2PRC-Escaping-NAT.md +++ b/content/technicalposts/P2PRC-Escaping-NAT.md @@ -17,7 +17,7 @@ The future plan would be to use a WebRTC approach to where we use a middle server to intansiate a direct p2p connection using UDP sockets with nodes behind NAT. -## Archtecture plan +## Architecture plan The server behind NAT would use a reverse proxy server with an IPV4 address to be a possible way to communicate with the outside world. @@ -39,6 +39,73 @@ could have certain ports already taken. We are introducting a new concept of detecting reverse proxies over P2PRC. We call this ``` reverse_proxy_server.json ``` and ``` reverse_proxy_mapping.json```. +The ```reverse_proxy_server.json``` file is incharge of detecting all reverse +proxy servers and the ```reverse_proxy_mapping.json``` is incharge of logging +all the reverse proxy server mappings talking place. + +#### reverse_proxy_server.json +``` +{ + "reverse_proxy_servers": [ + { + "Server_name": , + "Address": , + "Latency": + }, ... n + ] +} +``` + +#### reverse_proxy_mapping.json +``` +{ + "reverse_proxy_mappings": [ + { + "Server_name": , + "Address": , + "Type": , + "blind_port": + }, ... n + ] +} +``` + +### Port allocation +The function for port allocation would need certain +modifications need to ensure that the port is not only free +on the server but also on the on reverse proxy server. +We are debate on this would occur as it requires +further reading on the inner depths of [frp](https://github.com/fatedier/frp). +The idea scenario would be that the odds a 5 or 6 digit +taken is a low probability. + +### How would the ip tables would look +There would not be much change when a client looks +at it. This only difference is that the client +see's the address of the proxy server. + +Ex: +``` +{ + "ip_address": [ + { + "ipv4": "", + "ipv6": "", + "latency": 0, + "download": 0, + "upload": 0, + "serverport": "" + } + ] +} +``` + +If the server is using a reverse proxy then the server +port no should be decided by P2PRC to ensure that there +is no scenario where the port is already taken. + +More to be written :) + +More information email me: me AT akilan.io + -This draft is still underway :) -if you are interested to contribute email me: me AT akilan.io