diff --git a/gmi/docker/Dockerfile b/gmi/docker/Dockerfile index 94c3c39..92fd2d6 100644 --- a/gmi/docker/Dockerfile +++ b/gmi/docker/Dockerfile @@ -13,8 +13,8 @@ RUN git clone https://github.com/dongdigua/dongdigua.github.io.git --depth 1 \ COPY run-wrapper.sh . COPY gmid.conf /dongdigua.github.io/gmi/docker/ -COPY cgi/* /dongdigua.github.io/cgi/ COPY update-git.sh /etc/periodic/hourly/ +COPY cgi/* /dongdigua.github.io/cgi/ # for testing purpose only # RUN mkdir /etc/periodic/1min \ diff --git a/gmi/docker/README.gmi b/gmi/docker/README.gmi index 3e8bcb5..8bfd642 100644 --- a/gmi/docker/README.gmi +++ b/gmi/docker/README.gmi @@ -20,6 +20,7 @@ both need authentication, idea: * 6x (CLIENT CERTIFICATE REQUIRED) => gemini://gemini.circumlunar.space/docs/tls-tutorial.gmi doc: TLS => https://adnano.co/2021/03/06/gemini-tls/ TLS recommendations for Gemini +=> gemini://caseyrichins.online/logs/2023-06-09_gemini-client-certificates.gmi Client Certificates in Gemini * GPG in 1x (INPUT) client: date -u +%Y%m%dT%H | gpg -as diff --git a/gmi/docker/cgi/stat.cgi b/gmi/docker/cgi/stat.cgi index 958d55d..34a3945 100755 --- a/gmi/docker/cgi/stat.cgi +++ b/gmi/docker/cgi/stat.cgi @@ -1,4 +1,4 @@ #! /bin/sh -printf "20 text/gemini\r\n"; -printf "OS: $(uname -rv)\r\nuptime: $(uptime)\r\nserver: $SERVER_SOFTWARE\r\nauth: $AUTH\r\n"; +printf "20 text/gemini\r\n" +printf "OS: $(uname -rv)\r\nuptime: $(uptime)\r\nserver: $SERVER_SOFTWARE\r\n" diff --git a/gmi/docker/cgi/test_auth.cgi b/gmi/docker/cgi/test_auth.cgi new file mode 100755 index 0000000..8ce85d6 --- /dev/null +++ b/gmi/docker/cgi/test_auth.cgi @@ -0,0 +1,8 @@ +#! /bin/sh + +if [ -z $AUTH_TYPE ]; then + printf "60 \r\n" +else + printf "20 text/plain\r\n" + printf "auth: $AUTH_TYPE\r\nhash: $TLS_CLIENT_HASH\r\n" +fi