Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM python:3.8-slim-buster

# Create non-root user to run pyja3mas as
RUN useradd ja3user

WORKDIR /opt/pyja3mas

COPY requirements.txt *.py ./

RUN python3 -m pip install -r requirements.txt

RUN mkdir certs logs

# Generate key and certificate for pyja3mas
RUN openssl req -newkey rsa:4096 -nodes -keyout certs/privkey.pem -x509 -days 365 -out certs/fullchain.pem -subj "/C=US/ST=VA/L=Springfield/O=ACME/OU=IT/CN=localhost"

RUN chown -R ja3user:ja3user certs logs

USER ja3user

CMD python3 https_server.py
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ python3 https_server.py
```

This will start the server on `localhost:4443` by default. You can visit
`https://localhost:4443` on your browser. Make sure you inlcude `https` in
`https://localhost:4443` on your browser. Make sure you include `https` in
front of the domain, or the browser will not connect properly. To change the
host/port, go into the code and edit the `HOST` and `PORT` global variables.

Expand All @@ -68,3 +68,13 @@ browser's JA3 fingerprint, browser name, and browser version. It extracts all
of this data, except for the JA3 fingerprint, from the User-Agent string your
browser sends with the initial GET request.


### Docker
To run pyja3mas as a Docker container, first build the Docker image with:
`docker build -t pyja3mas .`

Then run the container with:
`docker run -p 127.0.0.1:443:4443 pyja3mas`

This will listen on port 443 of your loopback adapter for connections and
forward them to the running pyja3mas script inside the container.