From d1ca0d5e470835207ff340ddf989cca4d678fa1b Mon Sep 17 00:00:00 2001 From: Mikhail Mitskevich Date: Sat, 20 Dec 2025 07:48:20 +0300 Subject: [PATCH 1/2] Add nginx settings for new ciphers --- client/build_client.sh | 2 +- client/run_client.sh | 1 + server/btls256/Dockerfile | 15 ++++----- server/btls256/nginx.conf | 65 ++++++++++++++++++++++++++++++++------- server/btls384/Dockerfile | 42 ++----------------------- server/btls512/Dockerfile | 42 ++----------------------- server/docker-compose.yml | 6 ++++ 7 files changed, 76 insertions(+), 97 deletions(-) diff --git a/client/build_client.sh b/client/build_client.sh index 8fe8b19..fd279d9 100644 --- a/client/build_client.sh +++ b/client/build_client.sh @@ -5,7 +5,7 @@ gsettings-desktop-schemas-dev ca-certificates -y git clone https://github.com/bcrypto/bee2evp.git cd bee2evp -bash scripts/build.sh -s -b -t openssl-3.3.1 +bash scripts/build.sh -s -b openssl-3.3.1 cd .. export PREFIX=${PWD}/bee2evp/build/local diff --git a/client/run_client.sh b/client/run_client.sh index db3453a..39b85ff 100644 --- a/client/run_client.sh +++ b/client/run_client.sh @@ -5,5 +5,6 @@ export LD_LIBRARY_PATH=${PREFIX}/lib:${LD_LIBRARY_PATH} export PATH=${PREFIX}/bin:${PATH} export OPENSSL_CONF=${PREFIX}/openssl.cnf export GIO_MODULE_DIR=${PREFIX}/lib/x86_64-linux-gnu/gio/modules +export G_TLS_OPENSSL_CIPHER_LIST=BTLS_BASH_PRG_AE256_BASH256:BTLS_BELT_CHE256_BELT_HASH:DHE-BIGN-WITH-BELT-CTR-MAC-HBELT:DHE-BIGN-WITH-BELT-DWP-HBELT:DHT-BIGN-WITH-BELT-CTR-MAC-HBELT:DHT-BIGN-WITH-BELT-DWP-HBELT epiphany $1 \ No newline at end of file diff --git a/server/btls256/Dockerfile b/server/btls256/Dockerfile index 92260f8..d863ac3 100644 --- a/server/btls256/Dockerfile +++ b/server/btls256/Dockerfile @@ -14,19 +14,19 @@ RUN apt-get install -y -q \ patch \ cmake -COPY ./nginx.sh ./ -COPY ./index.html /etc/nginx/html/index.html -COPY ./priv256.key /etc/nginx/ssl/priv256.key -COPY ./cert256.pem /etc/nginx/ssl/cert256.pem -COPY ./nginx.conf /etc/nginx/nginx.conf ENV HOME /root WORKDIR $HOME RUN git clone https://github.com/bcrypto/bee2evp.git WORKDIR $HOME/bee2evp -RUN BEE2EVP_INSTALL_DIR=/opt/usr/local bash scripts/build.sh -s -b -t openssl-3.3.1 +RUN BEE2EVP_INSTALL_DIR=/opt/usr/local bash scripts/build.sh -s -b openssl-3.3.1 WORKDIR '/' +COPY ./nginx.sh ./ +COPY ./index.html /etc/nginx/html/index.html +COPY ./priv256.key /etc/nginx/ssl/priv.key +COPY ./cert256.pem /etc/nginx/ssl/cert.pem +COPY ./nginx.conf /etc/nginx/nginx.conf RUN bash ./nginx.sh WORKDIR $HOME @@ -38,4 +38,5 @@ EXPOSE 8443 EXPOSE 8444 EXPOSE 8445 EXPOSE 8446 - +EXPOSE 8447 +EXPOSE 8448 diff --git a/server/btls256/nginx.conf b/server/btls256/nginx.conf index 2dc4a49..7c0eaab 100644 --- a/server/btls256/nginx.conf +++ b/server/btls256/nginx.conf @@ -56,13 +56,14 @@ http { listen 443 ssl; server_name localhost; add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert256.pem; - ssl_certificate_key /etc/nginx/ssl/priv256.key; + ssl_certificate /etc/nginx/ssl/cert.pem; + ssl_certificate_key /etc/nginx/ssl/priv.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_prefer_server_ciphers on; ssl_ciphers DHE-BIGN-WITH-BELT-CTR-MAC-HBELT:DHE-BIGN-WITH-BELT-DWP-HBELT:DHT-BIGN-WITH-BELT-CTR-MAC-HBELT:DHT-BIGN-WITH-BELT-DWP-HBELT:DHE-PSK-BIGN-WITH-BELT-DWP-HBELT:DHE-PSK-BIGN-WITH-BELT-CTR-MAC-HBELT:DHT-PSK-BIGN-WITH-BELT-DWP-HBELT:DHT-PSK-BIGN-WITH-BELT-CTR-MAC-HBELT; - ssl_protocols TLSv1.2; + ssl_conf_command Ciphersuites BTLS_BASH_PRG_AE256_BASH256:BTLS_BELT_CHE256_BELT_HASH; + ssl_protocols TLSv1.2 TLSv1.3; location /check_server { proxy_pass http://flask-app:5000; proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; @@ -77,8 +78,8 @@ http { listen 8443 ssl; server_name localhost; add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert256.pem; - ssl_certificate_key /etc/nginx/ssl/priv256.key; + ssl_certificate /etc/nginx/ssl/cert.pem; + ssl_certificate_key /etc/nginx/ssl/priv.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_prefer_server_ciphers on; @@ -98,8 +99,8 @@ http { listen 8444 ssl; server_name localhost; add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert256.pem; - ssl_certificate_key /etc/nginx/ssl/priv256.key; + ssl_certificate /etc/nginx/ssl/cert.pem; + ssl_certificate_key /etc/nginx/ssl/priv.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_prefer_server_ciphers on; @@ -119,8 +120,8 @@ http { listen 8445 ssl; server_name localhost; add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert256.pem; - ssl_certificate_key /etc/nginx/ssl/priv256.key; + ssl_certificate /etc/nginx/ssl/cert.pem; + ssl_certificate_key /etc/nginx/ssl/priv.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_prefer_server_ciphers on; @@ -140,8 +141,8 @@ http { listen 8446 ssl; server_name localhost; add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert256.pem; - ssl_certificate_key /etc/nginx/ssl/priv256.key; + ssl_certificate /etc/nginx/ssl/cert.pem; + ssl_certificate_key /etc/nginx/ssl/priv.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers DHT-BIGN-WITH-BELT-DWP-HBELT; @@ -156,6 +157,48 @@ http { } } + server { + listen 8447 ssl; + server_name localhost; + add_header Strict-Transport-Security 'max-age=31536000' always; + ssl_certificate /etc/nginx/ssl/cert.pem; + ssl_certificate_key /etc/nginx/ssl/priv.key; + ssl_session_cache shared:SSL:1m; + ssl_session_timeout 5m; + ssl_ciphers DHT-BIGN-WITH-BELT-DWP-HBELT; + ssl_conf_command Ciphersuites BTLS_BASH_PRG_AE256_BASH256; + ssl_protocols TLSv1.3; + location /check_server { + proxy_pass http://flask-app:5000; + proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; + } + location / { + proxy_pass http://flask-app:5000; + proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; + } + } + + server { + listen 8448 ssl; + server_name localhost; + add_header Strict-Transport-Security 'max-age=31536000' always; + ssl_certificate /etc/nginx/ssl/cert.pem; + ssl_certificate_key /etc/nginx/ssl/priv.key; + ssl_session_cache shared:SSL:1m; + ssl_session_timeout 5m; + ssl_ciphers DHT-BIGN-WITH-BELT-DWP-HBELT; + ssl_conf_command Ciphersuites BTLS_BELT_CHE256_BELT_HASH; + ssl_protocols TLSv1.3; + location /check_server { + proxy_pass http://flask-app:5000; + proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; + } + location / { + proxy_pass http://flask-app:5000; + proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; + } + } + server { # catch all unsecure requests (both IPv4 and IPv6) listen 80 default_server; diff --git a/server/btls384/Dockerfile b/server/btls384/Dockerfile index 8955ec6..288e0ee 100644 --- a/server/btls384/Dockerfile +++ b/server/btls384/Dockerfile @@ -1,41 +1,5 @@ -FROM ubuntu:24.04 +FROM btls/btls256 -RUN apt-get clean -RUN apt-get update - -RUN apt-get install -y -q \ - wget \ - git \ - python3 \ - vim \ - nano \ - iptables \ - build-essential \ - patch \ - cmake - -COPY ./nginx.sh ./ -COPY ./index.html /etc/nginx/html/index.html -COPY ./priv384.key /etc/nginx/ssl/priv384.key -COPY ./cert384.pem /etc/nginx/ssl/cert384.pem -COPY ./nginx.conf /etc/nginx/nginx.conf -ENV HOME /root -WORKDIR $HOME - -RUN git clone https://github.com/bcrypto/bee2evp.git -WORKDIR $HOME/bee2evp -RUN BEE2EVP_INSTALL_DIR=/opt/usr/local bash scripts/build.sh -s -b -t openssl-3.3.1 - -WORKDIR '/' -RUN bash ./nginx.sh - -WORKDIR $HOME -ENV PREFIX /opt/usr/local -ENV LD_LIBRARY_PATH "${PREFIX}/lib:${LD_LIBRARY_PATH:-}" -ENV PATH ${PREFIX}/bin:${PATH} -EXPOSE 443 -EXPOSE 8443 -EXPOSE 8444 -EXPOSE 8445 -EXPOSE 8446 +COPY ./priv384.key /etc/nginx/ssl/priv.key +COPY ./cert384.pem /etc/nginx/ssl/cert.pem diff --git a/server/btls512/Dockerfile b/server/btls512/Dockerfile index 8785f48..c18f16d 100644 --- a/server/btls512/Dockerfile +++ b/server/btls512/Dockerfile @@ -1,40 +1,4 @@ -FROM ubuntu:24.04 +FROM btls/btls256 -RUN apt-get clean -RUN apt-get update - -RUN apt-get install -y -q \ - wget \ - git \ - python3 \ - vim \ - nano \ - iptables \ - build-essential \ - patch \ - cmake - -COPY ./nginx.sh ./ -COPY ./index.html /etc/nginx/html/index.html -COPY ./priv512.key /etc/nginx/ssl/priv512.key -COPY ./cert512.pem /etc/nginx/ssl/cert512.pem -COPY ./nginx.conf /etc/nginx/nginx.conf -ENV HOME /root -WORKDIR $HOME - -RUN git clone https://github.com/bcrypto/bee2evp.git -WORKDIR $HOME/bee2evp -RUN BEE2EVP_INSTALL_DIR=/opt/usr/local bash scripts/build.sh -s -b -t openssl-3.3.1 - -WORKDIR '/' -RUN bash ./nginx.sh - -WORKDIR $HOME -ENV PREFIX /opt/usr/local -ENV LD_LIBRARY_PATH "${PREFIX}/lib:${LD_LIBRARY_PATH:-}" -ENV PATH ${PREFIX}/bin:${PATH} -EXPOSE 443 -EXPOSE 8443 -EXPOSE 8444 -EXPOSE 8445 -EXPOSE 8446 +COPY ./priv512.key /etc/nginx/ssl/priv.key +COPY ./cert512.pem /etc/nginx/ssl/cert.pem diff --git a/server/docker-compose.yml b/server/docker-compose.yml index 142a888..428f218 100644 --- a/server/docker-compose.yml +++ b/server/docker-compose.yml @@ -46,6 +46,8 @@ services: - "8444:8444" - "8445:8445" - "8446:8446" + - "8447:8447" + - "8448:8448" command: tail -f /dev/null networks: back: @@ -67,6 +69,8 @@ services: - "8444:8444" - "8445:8445" - "8446:8446" + - "8447:8447" + - "8448:8448" command: tail -f /dev/null networks: back: @@ -88,6 +92,8 @@ services: - "8444:8444" - "8445:8445" - "8446:8446" + - "8447:8447" + - "8448:8448" command: tail -f /dev/null networks: back: From 1980cb535fe45c08bfa250d21af2bd20bcce6349 Mon Sep 17 00:00:00 2001 From: Mikhail Mitskevich Date: Thu, 9 Apr 2026 16:29:40 +0300 Subject: [PATCH 2/2] Add support for OpenSSL 3.5.5 --- client/build_client.sh | 2 +- server/btls256/Dockerfile | 2 +- server/btls256/nginx.conf | 6 +- server/btls256/nginx.sh | 8 +- server/btls384/index.html | 70 ---------------- server/btls384/nginx.conf | 166 -------------------------------------- server/btls384/nginx.sh | 27 ------- server/btls512/index.html | 70 ---------------- server/btls512/nginx.conf | 166 -------------------------------------- server/btls512/nginx.sh | 27 ------- server/flask/Dockerfile | 13 +-- 11 files changed, 10 insertions(+), 547 deletions(-) delete mode 100644 server/btls384/index.html delete mode 100644 server/btls384/nginx.conf delete mode 100644 server/btls384/nginx.sh delete mode 100644 server/btls512/index.html delete mode 100644 server/btls512/nginx.conf delete mode 100644 server/btls512/nginx.sh diff --git a/client/build_client.sh b/client/build_client.sh index fd279d9..383f3ff 100644 --- a/client/build_client.sh +++ b/client/build_client.sh @@ -5,7 +5,7 @@ gsettings-desktop-schemas-dev ca-certificates -y git clone https://github.com/bcrypto/bee2evp.git cd bee2evp -bash scripts/build.sh -s -b openssl-3.3.1 +bash scripts/build.sh -s -b openssl-3.5.5 cd .. export PREFIX=${PWD}/bee2evp/build/local diff --git a/server/btls256/Dockerfile b/server/btls256/Dockerfile index d863ac3..35c80a0 100644 --- a/server/btls256/Dockerfile +++ b/server/btls256/Dockerfile @@ -19,7 +19,7 @@ WORKDIR $HOME RUN git clone https://github.com/bcrypto/bee2evp.git WORKDIR $HOME/bee2evp -RUN BEE2EVP_INSTALL_DIR=/opt/usr/local bash scripts/build.sh -s -b openssl-3.3.1 +RUN BEE2EVP_INSTALL_DIR=/opt/usr/local bash scripts/build.sh -s -b openssl-3.5.5 WORKDIR '/' COPY ./nginx.sh ./ diff --git a/server/btls256/nginx.conf b/server/btls256/nginx.conf index 7c0eaab..f8383d3 100644 --- a/server/btls256/nginx.conf +++ b/server/btls256/nginx.conf @@ -62,7 +62,7 @@ http { ssl_session_timeout 5m; ssl_prefer_server_ciphers on; ssl_ciphers DHE-BIGN-WITH-BELT-CTR-MAC-HBELT:DHE-BIGN-WITH-BELT-DWP-HBELT:DHT-BIGN-WITH-BELT-CTR-MAC-HBELT:DHT-BIGN-WITH-BELT-DWP-HBELT:DHE-PSK-BIGN-WITH-BELT-DWP-HBELT:DHE-PSK-BIGN-WITH-BELT-CTR-MAC-HBELT:DHT-PSK-BIGN-WITH-BELT-DWP-HBELT:DHT-PSK-BIGN-WITH-BELT-CTR-MAC-HBELT; - ssl_conf_command Ciphersuites BTLS_BASH_PRG_AE256_BASH256:BTLS_BELT_CHE256_BELT_HASH; + ssl_conf_command Ciphersuites TLS_BASH_PRG_AE2561_BASH256:TLS_BELT_CHE256_BELT_HASH; ssl_protocols TLSv1.2 TLSv1.3; location /check_server { proxy_pass http://flask-app:5000; @@ -166,7 +166,7 @@ http { ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers DHT-BIGN-WITH-BELT-DWP-HBELT; - ssl_conf_command Ciphersuites BTLS_BASH_PRG_AE256_BASH256; + ssl_conf_command Ciphersuites TLS_BASH_PRG_AE2561_BASH256; ssl_protocols TLSv1.3; location /check_server { proxy_pass http://flask-app:5000; @@ -187,7 +187,7 @@ http { ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers DHT-BIGN-WITH-BELT-DWP-HBELT; - ssl_conf_command Ciphersuites BTLS_BELT_CHE256_BELT_HASH; + ssl_conf_command Ciphersuites TLS_BELT_CHE256_BELT_HASH; ssl_protocols TLSv1.3; location /check_server { proxy_pass http://flask-app:5000; diff --git a/server/btls256/nginx.sh b/server/btls256/nginx.sh index fcb74c3..69dc6dd 100644 --- a/server/btls256/nginx.sh +++ b/server/btls256/nginx.sh @@ -6,10 +6,10 @@ make make install cd .. -wget http://zlib.net/zlib-1.3.1.tar.gz -tar -zxf zlib-1.3.1.tar.gz +wget http://zlib.net/zlib-1.3.2.tar.gz +tar -zxf zlib-1.3.2.tar.gz ls / -cd zlib-1.3.1 +cd zlib-1.3.2 ./configure make make install @@ -21,7 +21,7 @@ tar -zxf nginx-1.29.3.tar.gz cd nginx-1.29.3 #patch -p1 -i nginx.patch ls / -./configure --pid-path=/usr/local/nginx/nginx.pid --with-pcre=/pcre-8.45 --with-zlib=/zlib-1.3.1 --with-http_ssl_module --with-stream --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --with-ld-opt="-L /opt/usr/local/lib" --with-cc-opt="-I /opt/usr/local/include" +./configure --pid-path=/usr/local/nginx/nginx.pid --with-pcre=/pcre-8.45 --with-zlib=/zlib-1.3.2 --with-http_ssl_module --with-stream --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --with-ld-opt="-L /opt/usr/local/lib" --with-cc-opt="-I /opt/usr/local/include" make make install cd .. \ No newline at end of file diff --git a/server/btls384/index.html b/server/btls384/index.html deleted file mode 100644 index a2df1c5..0000000 --- a/server/btls384/index.html +++ /dev/null @@ -1,70 +0,0 @@ - - - -Welcome to BTLS! - - - - -

Welcome to BTLS!

-

Search Button

- -

Server:

- - - -
- - -
- - - - diff --git a/server/btls384/nginx.conf b/server/btls384/nginx.conf deleted file mode 100644 index e87d10f..0000000 --- a/server/btls384/nginx.conf +++ /dev/null @@ -1,166 +0,0 @@ -#user nobody; -worker_processes 1; - -error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; - -#pid logs/nginx.pid; - - -events { - worker_connections 1024; -} - - -http { - include mime.types; - default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; - - sendfile on; - #tcp_nopush on; - - #keepalive_timeout 0; - keepalive_timeout 65; - #gzip on; - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - log_format custom_log_format '$remote_addr - $remote_user [$time_local]' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent"' - '$ssl_cipher'; - access_log /etc/nginx/logs/nginx-access.log custom_log_format; - - server { - listen 443 ssl; - server_name localhost; - add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert384.pem; - ssl_certificate_key /etc/nginx/ssl/priv384.key; - ssl_session_cache shared:SSL:1m; - ssl_session_timeout 5m; - ssl_ciphers DHE-BIGN-WITH-BELT-CTR-MAC-HBELT:DHE-BIGN-WITH-BELT-DWP-HBELT:DHT-BIGN-WITH-BELT-CTR-MAC-HBELT:DHT-BIGN-WITH-BELT-DWP-HBELT:DHE-PSK-BIGN-WITH-BELT-DWP-HBELT:DHE-PSK-BIGN-WITH-BELT-CTR-MAC-HBELT:DHT-PSK-BIGN-WITH-BELT-DWP-HBELT:DHT-PSK-BIGN-WITH-BELT-CTR-MAC-HBELT; - ssl_protocols TLSv1.2; - location /check_server { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - location / { - root html; - index index.html; - } - } - - server { - listen 8443 ssl; - server_name localhost; - add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert384.pem; - ssl_certificate_key /etc/nginx/ssl/priv384.key; - ssl_session_cache shared:SSL:1m; - ssl_session_timeout 5m; - ssl_ciphers DHE-BIGN-WITH-BELT-CTR-MAC-HBELT; - ssl_protocols TLSv1.2; - location /check_server { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - location / { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - } - - server { - listen 8444 ssl; - server_name localhost; - add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert384.pem; - ssl_certificate_key /etc/nginx/ssl/priv384.key; - ssl_session_cache shared:SSL:1m; - ssl_session_timeout 5m; - ssl_ciphers DHE-BIGN-WITH-BELT-DWP-HBELT; - ssl_protocols TLSv1.2; - location /check_server { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - location / { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - } - - server { - listen 8445 ssl; - server_name localhost; - add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert384.pem; - ssl_certificate_key /etc/nginx/ssl/priv384.key; - ssl_session_cache shared:SSL:1m; - ssl_session_timeout 5m; - ssl_ciphers DHT-BIGN-WITH-BELT-CTR-MAC-HBELT; - ssl_protocols TLSv1.2; - location /check_server { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - location / { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - } - - server { - listen 8446 ssl; - server_name localhost; - add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert384.pem; - ssl_certificate_key /etc/nginx/ssl/priv384.key; - ssl_session_cache shared:SSL:1m; - ssl_session_timeout 5m; - ssl_ciphers DHT-BIGN-WITH-BELT-DWP-HBELT; - ssl_protocols TLSv1.2; - location /check_server { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - location / { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - } - - server { - # catch all unsecure requests (both IPv4 and IPv6) - listen 80 default_server; - listen [::]:80 default_server ipv6only=on; - - # this means example.com, *.example.com - server_name .example.com; - - # permanently redirect client to https version of the site - return 301 https://example.com; - } -} diff --git a/server/btls384/nginx.sh b/server/btls384/nginx.sh deleted file mode 100644 index fcb74c3..0000000 --- a/server/btls384/nginx.sh +++ /dev/null @@ -1,27 +0,0 @@ -wget https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz -tar -zxf pcre-8.45.tar.gz -cd pcre-8.45 -./configure -make -make install -cd .. - -wget http://zlib.net/zlib-1.3.1.tar.gz -tar -zxf zlib-1.3.1.tar.gz -ls / -cd zlib-1.3.1 -./configure -make -make install -cd .. - -wget https://nginx.org/download/nginx-1.29.3.tar.gz -tar -zxf nginx-1.29.3.tar.gz -#cp ./nginx.patch ./nginx-1.21.3/nginx.patch -cd nginx-1.29.3 -#patch -p1 -i nginx.patch -ls / -./configure --pid-path=/usr/local/nginx/nginx.pid --with-pcre=/pcre-8.45 --with-zlib=/zlib-1.3.1 --with-http_ssl_module --with-stream --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --with-ld-opt="-L /opt/usr/local/lib" --with-cc-opt="-I /opt/usr/local/include" -make -make install -cd .. \ No newline at end of file diff --git a/server/btls512/index.html b/server/btls512/index.html deleted file mode 100644 index a2df1c5..0000000 --- a/server/btls512/index.html +++ /dev/null @@ -1,70 +0,0 @@ - - - -Welcome to BTLS! - - - - -

Welcome to BTLS!

-

Search Button

- -

Server:

- - - -
- - -
- - - - diff --git a/server/btls512/nginx.conf b/server/btls512/nginx.conf deleted file mode 100644 index d06e687..0000000 --- a/server/btls512/nginx.conf +++ /dev/null @@ -1,166 +0,0 @@ -#user nobody; -worker_processes 1; - -error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; - -#pid logs/nginx.pid; - - -events { - worker_connections 1024; -} - - -http { - include mime.types; - default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; - - sendfile on; - #tcp_nopush on; - - #keepalive_timeout 0; - keepalive_timeout 65; - #gzip on; - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - log_format custom_log_format '$remote_addr - $remote_user [$time_local]' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent"' - '$ssl_cipher'; - access_log /etc/nginx/logs/nginx-access.log custom_log_format; - - server { - listen 443 ssl; - server_name localhost; - add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert512.pem; - ssl_certificate_key /etc/nginx/ssl/priv512.key; - ssl_session_cache shared:SSL:1m; - ssl_session_timeout 5m; - ssl_ciphers DHE-BIGN-WITH-BELT-CTR-MAC-HBELT:DHE-BIGN-WITH-BELT-DWP-HBELT:DHT-BIGN-WITH-BELT-CTR-MAC-HBELT:DHT-BIGN-WITH-BELT-DWP-HBELT:DHE-PSK-BIGN-WITH-BELT-DWP-HBELT:DHE-PSK-BIGN-WITH-BELT-CTR-MAC-HBELT:DHT-PSK-BIGN-WITH-BELT-DWP-HBELT:DHT-PSK-BIGN-WITH-BELT-CTR-MAC-HBELT; - ssl_protocols TLSv1.2; - location /check_server { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - location / { - root html; - index index.html; - } - } - - server { - listen 8443 ssl; - server_name localhost; - add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert512.pem; - ssl_certificate_key /etc/nginx/ssl/priv512.key; - ssl_session_cache shared:SSL:1m; - ssl_session_timeout 5m; - ssl_ciphers DHE-BIGN-WITH-BELT-CTR-MAC-HBELT; - ssl_protocols TLSv1.2; - location /check_server { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - location / { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - } - - server { - listen 8444 ssl; - server_name localhost; - add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert512.pem; - ssl_certificate_key /etc/nginx/ssl/priv512.key; - ssl_session_cache shared:SSL:1m; - ssl_session_timeout 5m; - ssl_ciphers DHE-BIGN-WITH-BELT-DWP-HBELT; - ssl_protocols TLSv1.2; - location /check_server { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - location / { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - } - - server { - listen 8445 ssl; - server_name localhost; - add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert512.pem; - ssl_certificate_key /etc/nginx/ssl/priv512.key; - ssl_session_cache shared:SSL:1m; - ssl_session_timeout 5m; - ssl_ciphers DHT-BIGN-WITH-BELT-CTR-MAC-HBELT; - ssl_protocols TLSv1.2; - location /check_server { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - location / { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - } - - server { - listen 8446 ssl; - server_name localhost; - add_header Strict-Transport-Security 'max-age=31536000' always; - ssl_certificate /etc/nginx/ssl/cert512.pem; - ssl_certificate_key /etc/nginx/ssl/priv512.key; - ssl_session_cache shared:SSL:1m; - ssl_session_timeout 5m; - ssl_ciphers DHT-BIGN-WITH-BELT-DWP-HBELT; - ssl_protocols TLSv1.2; - location /check_server { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - location / { - proxy_pass http://flask-app:5000; - proxy_set_body "$ssl_cipher#$ssl_ciphers#$ssl_curves#$ssl_protocol"; - } - } - - server { - # catch all unsecure requests (both IPv4 and IPv6) - listen 80 default_server; - listen [::]:80 default_server ipv6only=on; - - # this means example.com, *.example.com - server_name .example.com; - - # permanently redirect client to https version of the site - return 301 https://example.com; - } -} diff --git a/server/btls512/nginx.sh b/server/btls512/nginx.sh deleted file mode 100644 index fcb74c3..0000000 --- a/server/btls512/nginx.sh +++ /dev/null @@ -1,27 +0,0 @@ -wget https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.gz -tar -zxf pcre-8.45.tar.gz -cd pcre-8.45 -./configure -make -make install -cd .. - -wget http://zlib.net/zlib-1.3.1.tar.gz -tar -zxf zlib-1.3.1.tar.gz -ls / -cd zlib-1.3.1 -./configure -make -make install -cd .. - -wget https://nginx.org/download/nginx-1.29.3.tar.gz -tar -zxf nginx-1.29.3.tar.gz -#cp ./nginx.patch ./nginx-1.21.3/nginx.patch -cd nginx-1.29.3 -#patch -p1 -i nginx.patch -ls / -./configure --pid-path=/usr/local/nginx/nginx.pid --with-pcre=/pcre-8.45 --with-zlib=/zlib-1.3.1 --with-http_ssl_module --with-stream --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --with-ld-opt="-L /opt/usr/local/lib" --with-cc-opt="-I /opt/usr/local/include" -make -make install -cd .. \ No newline at end of file diff --git a/server/flask/Dockerfile b/server/flask/Dockerfile index 178121d..dbf53ff 100644 --- a/server/flask/Dockerfile +++ b/server/flask/Dockerfile @@ -1,6 +1,5 @@ FROM python:3.12 -#RUN apt-get update RUN pip install flask RUN apt-get update @@ -20,20 +19,10 @@ WORKDIR $HOME RUN git clone https://github.com/bcrypto/bee2evp.git WORKDIR $HOME/bee2evp RUN ls -lah / -RUN BEE2EVP_INSTALL_DIR=/opt/usr/local bash scripts/build.sh -s -b -t openssl-3.3.1 +RUN BEE2EVP_INSTALL_DIR=/opt/usr/local bash scripts/build.sh -s -b -t openssl-3.5.5 ENV PREFIX $HOME/bee2evp/build/local ENV LD_LIBRARY_PATH "${PREFIX}/lib:${LD_LIBRARY_PATH:-}" ENV PATH ${PREFIX}/bin:${PATH} -#RUN apt-get install echo -y -q -#WORKDIR /backend - -#COPY requirements.txt /backend -#RUN pip3 install --upgrade pip -r requirements.txt -#RUN apt-get install vim -y -q - -#COPY . /backend EXPOSE 5000 -#EXPOSE 443 -#ENTRYPOINT [ "python3", "app.py" ] \ No newline at end of file