Gophermap RFC improvement

This commit is contained in:
Luxferre
2023-03-31 08:22:32 +03:00
parent 713a34e1aa
commit 429a9ab40c
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -13,6 +13,7 @@ Improvements over the original Bopher from that post:
- mouse support (where possible) - mouse support (where possible)
- smoother rendering and scrolling - smoother rendering and scrolling
- better edge-case stability (e.g. on macOS where using file descriptor 3 actually crashes everything) - better edge-case stability (e.g. on macOS where using file descriptor 3 actually crashes everything)
- better Gophermap processing according to the RFC
- multi-level navigation history (although you can only go back) - multi-level navigation history (although you can only go back)
- status bar with currently opened resource name - status bar with currently opened resource name
- ability to accept `gopher://` URLs from the command line - ability to accept `gopher://` URLs from the command line
@@ -58,6 +59,10 @@ Besides having Tor itself up and running, you also need to have the `torsocks` w
torsocks bash bopher-ng.sh gopher://[some-address].onion torsocks bash bopher-ng.sh gopher://[some-address].onion
``` ```
## Will there be any Gopher-TLS support?
No. Besides the ambiguity problem, it will also introduce huge external dependencies. Use .onion services instead whenever possible.
## How to control Bopher-NG? ## How to control Bopher-NG?
- Scrolling: Up/Down arrow keys, k/j keys or mouse scroll wheel (if supported) - Scrolling: Up/Down arrow keys, k/j keys or mouse scroll wheel (if supported)
+2
View File
@@ -7,6 +7,7 @@
# - mouse support # - mouse support
# - smoother rendering and scrolling # - smoother rendering and scrolling
# - better edge-case stability # - better edge-case stability
# - better Gophermap processing according to the RFC
# - multi-level navigation history (although you can only go back) # - multi-level navigation history (although you can only go back)
# - status bar with currently opened resource name # - status bar with currently opened resource name
# - ability to accept gopher:// URLs from the command line # - ability to accept gopher:// URLs from the command line
@@ -152,6 +153,7 @@ amclick() { # args: AM line[, forcedl], output: AM line(s)
for line in "${lines[@]}"; do # iterate over every fetched line for line in "${lines[@]}"; do # iterate over every fetched line
line="${line##$'\n'}" # remove a starting LF if it's there line="${line##$'\n'}" # remove a starting LF if it's there
line="${line%%$'\r'}" # remove a trailing CR if it's there line="${line%%$'\r'}" # remove a trailing CR if it's there
[[ "$line" == '.' ]] && break # stop processing Gophermaps on .
gmparse "$line" "$rhost" "$rport" gmparse "$line" "$rhost" "$rport"
done done
elif [[ 'P' == "$action" ]]; then # plain text content (can be delimited with both CRLF or LF) elif [[ 'P' == "$action" ]]; then # plain text content (can be delimited with both CRLF or LF)