A Decentralized CLI Browser Concept
- To operate it type the command id/index.
- To search type the
6command and press enter.- Now, search for the page that you are looking for and press "Enter".
- To run the page, type
-y {id}the id is the page id/index as shown in the CLI. - To close the search query command type
-n.
- To close the browser type
0.
- Running in the main thread
- Shutdown channel is the global channel that shutsdown all the tab. The command channel is local channel that only has access to a particular tab
- It is running in an individual Goroutine. (parent: main)
- New tab is like creating new Goroutine. (parent: user_input)
- 1 Tab can only serve 1 webpage at a time.
- The server that serves the webpage runs in a goroutine. (parent: tab)
- A webpage is simply a static HTML/CSS/JS directory.
- All the webpages are read from the
/webpagesdirectory. - Two way to remove or add a new webpage to the browser:
- You can paste the directory that contains the necessary files inside the
/webpages. - Use the
Searchoption and try searching for the particular webpage.
- You can paste the directory that contains the necessary files inside the
- User can search the local webpages and the webpages of the nodes
- It is running in an individual Goroutine. (parent: main)
- If another browser sends a message starting with "1" then that means they are checking if you are active and interested in sending the nodes copy you have
- If the message starts with "n" then it is the list of nodes, ip:port,ip:port...
- 0 has no use at the moment.
- https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes | sysctl -w kern.ipc.maxsockbuf=8441037
- Sync: if this is off, then the browser is completely disconnected from nodes.
- SendNodes: if this is off, then the browser never shares its nodes.
- ReceiveNodes: if this is off then the browser never saves any received nodes.
- Clean variables like
Webpagesafter user goes back to main user input. - anyone can send nodes, without limit. add some rate limit to receiving nodes and the receivers.
- HTML Parser