Skip to content

Commit

Permalink
Small moving / renaming of files. Adding TLS configuration setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
zyronix committed Jan 15, 2025
1 parent c50728e commit 1b0bc92
Show file tree
Hide file tree
Showing 9 changed files with 131 additions and 38 deletions.
33 changes: 0 additions & 33 deletions doc/advanced.md

This file was deleted.

2 changes: 2 additions & 0 deletions doc/advanced_usage/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Docker
Maybe a page here with some docker internals?
Empty file.
7 changes: 7 additions & 0 deletions doc/advanced_usage/slow_hashes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Slow Algorithms

To extract all Hashcat modes which are flagged as slow hashes, following command can be run inside the hashcat directory:

```
grep -Hr SLOW_HASH src/modules/ | cut -d: -f1 | sort | cut -d'.' -f1 | sed 's/src\/modules\/module_[0]\?//g'
```
107 changes: 107 additions & 0 deletions doc/advanced_usage/tls.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# SSL/TLS Setup
On this page the setup proces will be described howto setup SSL for Hashtopolis. Before you continue it is highly recommanded to read [Docker](docker.md).

## Generate x509 Certificate
First create a folder were we are going to store all of our hashtopolis persistent files.

```bash

mkdir hashtopolis/
cd hashtopolis/

```

Next generate a self signed certificate

```bash

openssl req -x509 -newkey rsa:2048 -keyout nginx.key -out nginx.crt -days 365 -nodes

```

## Setting up docker-compose and env.example

Please see the [Install](../install.md) page on how to download those settings file.

1. Edit docker-compose.yaml

Add the following new container to the `service:` section in the docker-compose.yaml.

```json
nginx:
container_name: nginx
image: nginx:latest
restart: always
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx.crt:/etc/nginx/ssl/nginx.crt:ro
- ./nginx.key:/etc/nginx/ssl/nginx.key:ro
ports:
- 443:443
- 80:80
```

2. Create a nginx.conf

Make sure that the server_name reflects your real server name. If you have changed the container names inside your docker-compose file, make sure to reflect those changes inside the nginx.conf file below.

```
events {
worker_connections 1024;
}
http {
server {
listen 80;
server_name localhost;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name localhost;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
proxy_pass http://hashtopolis-frontend;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /api/v2 {
proxy_pass http://hashtopolis-backend:80/api/v2;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /old {
proxy_pass http://hashtopolis-backend/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}
```

3. Edit the `HASHTOPOLIS_BACKEND_URL` in `.env` to `https://localhost/api/v2` to reflect the changes done above.

4. Start the containers
```
docker compose up
```
5. Visit hashtopolis on http://localhost/ the old ui is available via http://localhost/old
File renamed without changes.
File renamed without changes.
20 changes: 15 additions & 5 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,25 @@ docs_dir: doc
nav:
- index.md
- install.md
- User_Manual:
- User_Manual/user_manual.md
- User_Manual/advanced_hashlist.md
- User_Manual/settings_and_configuration.md
- advanced.md
- User Manual:
- user_manual/user_manual.md
- user_manual/advanced_hashlist.md
- user_manual/settings_and_configuration.md
- Advanced Usage:
- advanced_usage/tls.md
- advanced_usage/docker.md
- advanced_usage/generic_cracker.md
- advanced_usage/slow_hashes.md
- changelog.md
- API Reference:
- APIv2: apiv2.md

theme:
name: material
logo: assets/images/logo.png
features:
- content.code.copy
- content.action.edit
edit_uri: blob/docs/doc/ # Edit the URL to the static branch and folder
markdown_extensions:
- github-callouts # Add the ability of notes, warnings, etc.
Expand Down

0 comments on commit 1b0bc92

Please sign in to comment.