Proxy Authentication Wall to protect other websites
- TypeScript 90.2%
- JavaScript 4.1%
- EJS 3.9%
- Dockerfile 0.8%
- Shell 0.7%
- Other 0.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
2025-05-13 06:25:13 +00:00 | |
| .forgejo/workflows | 2025-04-19 14:57:27 +00:00 | |
| hooks | 2024-11-01 12:49:51 +01:00 | |
| src | 2025-05-01 22:52:32 +02:00 | |
| test | 2024-10-11 12:53:52 +00:00 | |
| .gitignore | 2024-09-27 21:22:24 +02:00 | |
| docker-compose.yml | 2025-04-11 10:50:35 +02:00 | |
| Dockerfile | 2025-05-06 22:01:28 +00:00 | |
| eslint.config.mjs | 2024-10-15 16:39:14 +02:00 | |
| jest-env.ts | 2024-10-15 17:01:49 +02:00 | |
| jest.config.ts | 2025-03-28 13:08:56 +01:00 | |
| LICENSE | 2024-09-13 22:00:30 +00:00 | |
| package-lock.json | 2025-05-12 22:01:07 +00:00 | |
| package.json | 2025-04-11 10:57:27 +02:00 | |
| README.md | 2025-03-28 13:08:56 +01:00 | |
| renovate.json | 2025-03-27 22:19:59 +00:00 | |
| tsconfig.json | 2024-10-09 15:41:36 +00:00 | |
| webpack.config.ts | 2024-10-09 15:41:36 +00:00 | |
Preauth Proxy
Running the Application
Using Docker
- Basic Command:
Execute the following command to run the container:
docker run -it --rm -p 3000:3000 timedin/preauth-proxy:latest - With .env file:
If you have a .env file with your environment variables, use the following command:
docker run --env-file .env -it --rm -p 3000:3000 timedin/preauth-proxy:latest
Using Docker Compose
- Download the docker-compose.yml
- Set the environment variables to your configuration
- Run the following command to start the stack:
docker compose up -d
Downloading Prebuilt Version
- Download the complete build from the release page
- Extract the files
- Set your environment variables according to Configuration section
- Start the server using the following command:
node ./dist/server/index.js
Configuration
Following environment variables are used for config
JWT_SECRETRandom secret for JWT loggedin token (required!)USERSJSON-Array of users and passwords allowed (required!) | Example:[{"username":"user1", "password": "pass1"}]ROUTESRoutes for Proxy (required!) | Example:[{"host":"example.com", "target":"http://localhost:3000"}]
Optional Config:HOSTHost/Interface of the webserver to listen on (default and when dockerized: 0.0.0.0)PORTPort of the webserver for frontend and backend (default 3000)DOMAINDomain for cookie for subdomain wide access (no default)COOKIE_SECURESet cookies to https only (default false)COOKIE_SAMESITESet cookies for cross-originALLOWED_ORIGINSSemicolon (;) seperated list of CORS Domains OR *