-- Leo's gemini proxy
-- Connecting to vostok.any-key.press:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
Install external dependencies if needed:
Clone repository content:
$ git clone ssh://anonymous@got.any-key.press/vostok $ cd vostok
Bind domain name "gemini.localhost" lo local IP address "127.0.0.1" (run as root):
# echo "127.0.0.1 gemini.localhost" >> /etc/hosts
Generate self-signed certificate and key for "gemini.localhost":
$ mkdir cert/ $ openssl req -newkey rsa:4096 -nodes -keyout cert/server.key -x509 -days 36500 -out cert/server.crt Generating a 4096 bit RSA private key <...> writing new private key to 'cert/server.key' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) []: State or Province Name (full name) []: Locality Name (eg, city) []: Organization Name (eg, company) []: Organizational Unit Name (eg, section) []: Common Name (eg, fully qualified host name) []:gemini.localhost Email Address []:
Build and run server:
$ make run make -C vostok c++ -O2 -pipe -Wall -Wextra -std=c++11 -c -o transport.o transport.cc c++ -O2 -pipe -Wall -Wextra -std=c++11 -c -o error.o error.cc c++ -O2 -pipe -Wall -Wextra -std=c++11 -c -o gemini.o gemini.cc c++ -O2 -pipe -Wall -Wextra -std=c++11 -c -o args.o args.cc c++ -O2 -pipe -Wall -Wextra -std=c++11 -c -o parse_url.o parse_url.cc c++ -O2 -pipe -Wall -Wextra -std=c++11 -c -o open_file.o open_file.cc c++ -O2 -pipe -Wall -Wextra -std=c++11 -c -o vostok.o vostok.cc c++ -o vostok transport.o error.o gemini.o args.o parse_url.o open_file.o vostok.o -ltls ./vostok/vostok -c cert/server.crt -k cert/server.key -f ./ 🚀 Vostok server listening...
Display index page using your favorite Gemini client (from another console):
$ amfora gemini.localhost
-- Response ended
-- Page fetched on Sun May 12 22:44:55 2024