https://github.com/siarheidudko/simple-proxy
A simple proxy server with access token verification and the ability to proxy unencrypted traffic. You probably shouldn't use this in production, but you can use it on the internal network or behind nginx with ssl.
https://github.com/siarheidudko/simple-proxy
docker http proxy-server tcp-server websocket
Last synced: 6 months ago
JSON representation
A simple proxy server with access token verification and the ability to proxy unencrypted traffic. You probably shouldn't use this in production, but you can use it on the internal network or behind nginx with ssl.
- Host: GitHub
- URL: https://github.com/siarheidudko/simple-proxy
- Owner: siarheidudko
- License: mit
- Created: 2023-06-15T20:01:35.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-15T20:26:11.000Z (almost 3 years ago)
- Last Synced: 2025-06-04T04:16:41.252Z (10 months ago)
- Topics: docker, http, proxy-server, tcp-server, websocket
- Language: JavaScript
- Homepage: https://hub.docker.com/r/sergdudko/simple-proxy
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple proxy
A simple proxy server with access token verification and the ability to proxy unencrypted traffic. You probably shouldn't use this in production, but you can use it on the internal network or behind nginx with ssl.
## Setup
Add configuration settings (the default values are given):
- PROXY_KEY_FILE=/app/.keys - the path to the access keys (the server listens for changes)
- PROXY_PORT=8000 - the port of the proxy server
- PROXY_MAX_LISTENERS=0 - max listeners, 0 - unlimited
- REMOTE_HOST=google.com - host of the remote server
- REMOTE_PORT=80 - port of the remote server
- PROXY_WORKERS=4 - number of the workers
### Format of the key file
```txt
access_key_1
access_key_2
access_key_3
```
### Example of use in kubernetes
```yaml
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: proxy-keys
namespace: proxy-system
data:
keys: MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAw
---
apiVersion: v1
kind: Service
metadata:
name: proxy-service
namespace: proxy-system
labels:
app: proxy
spec:
ports:
- name: proxy-server
port: 8000
protocol: TCP
targetPort: 8000
selector:
app: proxy
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: proxy
tier: proxy-server
name: proxy-server
namespace: proxy-system
spec:
selector:
matchLabels:
app: proxy
tier: proxy-server
strategy:
type: Recreate
template:
metadata:
labels:
app: proxy
tier: proxy-server
spec:
containers:
- name: proxy-server
image: sergdudko/simple-proxy:latest
env:
- name: PROXY_KEY_FILE
value: "/app/.keys"
- name: PROXY_PORT
value: "8000"
- name: PROXY_MAX_LISTENERS
value: "0"
- name: REMOTE_HOST
value: "google.com"
- name: REMOTE_PORT
value: "80"
- name: PROXY_WORKERS
value: "4"
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8000
protocol: TCP
resources:
limits:
cpu: 100m
memory: 128Mi
volumeMounts:
- name: proxy-keys-storage
mountPath: /app/.keys
subPath: keys
readOnly: true
volumes:
- name: proxy-keys-storage
secret:
secretName: proxy-keys
```
## Use
Use the `API-KEY` header for authorization, default token `00000000-0000-0000-0000-000000000000`.