Main docs
brwrs is a new protocol running over TCP/IP that is intended to be a suitable candidate for terminal-only servers (plain text data). That is, although it can be accessed from a browser, brwrs will not correctly interpret the browser's GET request.
brwrs uses a request protocol similar to HTTP(S), but aims to simplify it a bit, removing unnecessary elements such as the UserAgent and browser fingerprinting. By default, the server software does not log IPs, but that can be easily achieved modifying the source code.
Protocol
A standard request that wants the contents of a particular file looks like this (server console):
(server)
GET request -> GET index.txt
Requested file -> static/index.txt
Response sent
To do so, the client sends a GET index.txt
request to the server, getting a response like this:
(client)
Hello World!
Requests
GET
GET requests have the following structure. GET
NODE
NODE requests are as following. NODE
Setup
Server administrator
- Clone or download the brwrs-server folder, build it (
cargo build --release
) and place the generated binary in your preferred folder. - Then, just start your server with
./brwrs-server
. The default port is 90 if no port is supplied.
Server
The server directory structure should be:
brwrs-server
/static
index.txt
MOTD
MOTD is an optional but recommended file. If no MOTD file is supplied, an OK response will be sent to answer empty GET requests.
Normal user
- First, find some cool brwrs instances you want to connect to.
- Clone or download the brwrs-client folder, build it (
cargo build --release
) and place the binary generated in your preferred folder. - There are different ways of connecting to a server.
./brwrs-client
, just sends an empty GET request.:90 ./brwrs-client
, asks for a file.:90 ./brwrs-client
, asks:90 :90
to work as a proxy for you to reach:90
, that is hosted in
.:90
Client
The client does not need any extra configuration steps. Anyway, having an AUTO file is recommended to create NODE requests quickly. The AUTO file stores brwrs server(s) that the user trust. Whenever the user wants to proxy a request, every server (in order) stored in the AUTO file will be reached and asked to proxy the request.
(AUTO)
localhost:90
example.example:90
brwrs.brwrs:90
...
Extra docs
These docs are not needed for a normal use, but might be interesting to read to understand better the docs above.
Connection
To turn on your server, just run the binary file generated by the brwrs-client library. Create a ./static
directory at the location you are running the server, so clients can request files.
Important. Before running a production server, bear in mind that the file request method (server-side) may have security bugs. You may want to restrict what the binary can read.
$ ./brwrs-server
Server listening -> 0.0.0.0:90
To get connected to a server from the client, just run the brwrs-server binary specifying the host (e.g., localhost:90
) and, optionally, the path.
$ ./brwrs-client localhost:90 index.txt
Hello World!
Proxying with nodes
brwrs servers are capable of getting a NODE request from a client, pass it to another server through a GET request and give to the original client the response of the second server. That is, a simple proxy.
$ ./brwrs-client localhost:90 localhost:100 index.txt
(server:90)
NODE request -> NODE localhost:100 index.txt
Reaching destination server
Destination server reached
Sending the response to the original client
at the same time
(server:100)
GET request -> GET index.txt
Requested file -> static/index.txt
Response sent
$ ./brwrs-client localhost:90 localhost:100 index.txt
Hello World!
See NODE for a simple scheme.
To do
- Encryption
- Safer static server