Program for remote comunication, bypassing firewall using UDP protocol.
Whole program is divided into three parts:
- Client (The one "outside" the network making requests into network) see folder
web
- Gatweay (Available through internet, listening on public ip in selected UDP port) see folder
gateway
- ClientRelay (The one "inside" local network, responding to requests) see folder
service
What it does?
Having a webserver on some hostname (public.examplehost.local
), on request fro ousitde, transfer and mimic this request in local network, into "local only" host (private.examplehost.local
), and return apropirate response with headers. In setup section, below, is described
- Create a web server (for example apache2)
- Configure two virtual hosts (pick any names, and directories)
- ServerName
public.examplehost.local
- ServerName
private.examplehost.local
- Please refer to your webserver's configuration giude
- ServerName
- set hostnames in hosts file:
- File is located:
- On windows:
%windir%\System32\drivers\etc\hosts
- On *nix:
/etc/hosts
- On windows:
- Add:
- 127.0.0.1 public.examplehost.local
- 127.0.0.1 private.examplehost.local
- File is located:
- create
index.php
in root directorypublic.examplehost.local
, and includeweb/index.php
- set all request to point into
index.php
for hostpublic.examplehost.local
- If you allow
mod_rewrite
, for this host, everything is pre-configured inweb/.htaccess
- If you allow
- create some simple response for
private.examplehost.local
- Configure ip addresses and ports in this project
- #TODO: descibe
- Start
php gateway/gateway.php
- Start
php service/service.php
- Visit
public.examplehost.local
with web browser
Always a 2-byte sequences
Client
L:
Login, folowed by id and responseP:
Ping ServicePR
Ping Service, I am relay, yes?RR
Relay request - I will be relay now for my id
Server
N.
No action, usual reply for pingA:
Authorize! Followed by random bytes challengeF:
Auth failedRY
Relay confirmed
Both
RI
Relay init message (c2s 1x)RS
Relay send message (c2s n*)
- First version may contain numerous bugs
- Only IPv4 Tested