https://github.com/agabani/tor-operator
Tor Operator is a Kubernetes Operator that manages Onion Balances, Onion Keys and Onion Services to provide a highly available, load balanced and fault tolerate Tor Ingress and Tor Proxy.
https://github.com/agabani/tor-operator
helm kubernetes kubernetes-controller kubernetes-operator onion-service onionbalance rust tor tor-ingress tor-proxy
Last synced: 2 months ago
JSON representation
Tor Operator is a Kubernetes Operator that manages Onion Balances, Onion Keys and Onion Services to provide a highly available, load balanced and fault tolerate Tor Ingress and Tor Proxy.
- Host: GitHub
- URL: https://github.com/agabani/tor-operator
- Owner: agabani
- License: mit
- Created: 2023-06-02T00:06:45.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2026-01-13T02:41:40.000Z (5 months ago)
- Last Synced: 2026-01-13T05:53:37.387Z (5 months ago)
- Topics: helm, kubernetes, kubernetes-controller, kubernetes-operator, onion-service, onionbalance, rust, tor, tor-ingress, tor-proxy
- Language: Rust
- Homepage: https://agabani.github.io/tor-operator/docs/
- Size: 7.2 MB
- Stars: 15
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Security: docs/security/cluster_role.md
Awesome Lists containing this project
README
# Tor Operator
Tor Operator is a Kubernetes Operator that manages [Onion Balances](https://agabani.github.io/tor-operator/docs/custom_resource_definitions/onionbalance/), [Onion Keys](https://agabani.github.io/tor-operator/docs/custom_resource_definitions/onionkey/) and [Onion Services](https://agabani.github.io/tor-operator/docs/custom_resource_definitions/onionservice/) to provide a highly available, load balanced and fault tolerate [Tor Ingress](https://agabani.github.io/tor-operator/docs/custom_resource_definitions/toringress/) and [Tor Proxy](https://agabani.github.io/tor-operator/docs/custom_resource_definitions/torproxy/).
## Documentation
[https://agabani.github.io/tor-operator/docs/](https://agabani.github.io/tor-operator/docs/)
## Installation
1. Add the chart repository.
helm repo add agabani-tor-operator https://agabani.github.io/tor-operator
1. Update the chart repository.
helm repo update agabani-tor-operator
1. Install the Tor Operator.
helm upgrade tor-operator agabani-tor-operator/tor-operator \
--create-namespace \
--install \
--namespace tor-operator
1. Test the Tor Operator.
helm test tor-operator --namespace tor-operator
## Creating a Tor Ingress
1. Prepare your existing Onion Key to look like:
- `hostname`
- `hs_ed25519_public_key`
- `hs_ed25519_secret_key`
or generate a new Onion Key using:
cargo install --git https://github.com/agabani/tor-operator --tag v1.0.8
tor-operator onion-key generate
1. Create a `Secret` containing the Onion Key.
kubectl create secret generic tor-ingress-example \
--from-file=hostname=./hostname \
--from-file=hs_ed25519_public_key=./hs_ed25519_public_key \
--from-file=hs_ed25519_secret_key=./hs_ed25519_secret_key
1. Create an `OnionKey` wrapping the `Secret`.
# onionkey.yaml
apiVersion: tor.agabani.co.uk/v1
kind: OnionKey
metadata:
name: tor-ingress-example
spec:
secret:
name: tor-ingress-example
`kubectl apply -f onionkey.yaml`
1. Create a `TorIngress`, changing `example:80` to your targets `host:port`
# toringress.yaml
apiVersion: tor.agabani.co.uk/v1
kind: TorIngress
metadata:
name: tor-ingress-example
spec:
horizontalPodAutoscaler:
maxReplicas: 6
minReplicas: 3
onionBalance:
onionKey:
name: tor-ingress-example
onionService:
deployment:
containers:
- name: tor
resources:
requests:
cpu: 100m
ports:
- target: example:80
virtport: 80
`kubectl apply -f toringress.yaml`
## Creating a Tor Proxy
1. Create a `TorProxy`
# torproxy.yaml
apiVersion: tor.agabani.co.uk/v1
kind: TorProxy
metadata:
name: tor-proxy-example
spec:
deployment:
containers:
- name: tor
resources:
requests:
cpu: 100m
horizontalPodAutoscaler:
maxReplicas: 4
minReplicas: 2
service:
ports:
- name: http-tunnel
port: 1080
protocol: HTTP_TUNNEL
- name: socks
port: 9050
protocol: SOCKS
`kubectl apply -f torproxy.yaml`
## Screenshots




