WARNING: This plugin is still in early development! DO NOT USE IN PRODUCTION!
About JA4:
About JA3:
- Add the LUA script
ja4h.lua
to your system. Available HTTP fetches are: HAProxy HTTP fetches
- Enable SSL/TLS capture with the global setting tune.ssl.capture-buffer-size 96
- Load the LUA module with
lua-load /etc/haproxy/lua/ja4h.lua
- Execute the LUA script on HTTP requests:
http-request lua.fingerprint_ja4h
- Log the fingerprint:
http-request capture var(txn.fingerprint_ja4h) len 36
If you have:
- Found an issue/bug - please report it
- Have an idea on how to improve it - feel free to start a discussion
- PRs are welcome
- Have not yet found an option to access the request object
req
.
-
Create snakeoil certificate:
openssl req -x509 -newkey rsa:4096 -sha256 -nodes -subj "/CN=HAProxy JA4H Test" -addext "subjectAltName = DNS:localhost,IP:127.0.0.1" -keyout /tmp/haproxy.key.pem -out /tmp/haproxy.crt.pem -days 30 cat /tmp/haproxy.crt.pem /tmp/haproxy.key.pem > /tmp/haproxy.pem
-
Link the LUA script:
ln -s $(pwd)/ja4h.lua /tmp/haproxy_ja4h.lua
-
You can run the
haproxy_example.cfg
manually like this:haproxy -W -f haproxy_example.cfg
-
Access the test website: https://localhost:6969/