Support for mirroring Git repositories hosted exclusively over Tor (.onion) #14829

Closed
opened 2025-11-02 11:23:53 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @Ks2wAu89jnEgCR0bGUAA on GitHub (Aug 2, 2025).

Feature Description

Is it currently possible to mirror a Git repository that is only accessible via Tor (i.e., a .onion address)? I’ve been experimenting with the repository mirroring feature, but it seems to only work with clearnet URLs or authenticated services reachable over the regular internet.

Some repositories, especially those focused on anonymity, censorship resistance, or privacy are only hosted as Tor hidden services. I'd like to be able to mirror them into a Gitea instance, either for backup or broader access by non-Tor users.

If this isn't currently supported, would it be possible to consider this as a feature request?

Suggested feature:
Allow Gitea to mirror repositories over Tor by integrating Tor connectivity (e.g., using a local Tor SOCKS5 proxy).

Perhaps add configuration options in the admin panel or environment variables to enable Tor routing for mirroring.

This would be useful for privacy-focused communities, archiving decentralized content, and improving interoperability between clearnet and darknet development efforts.

Screenshots

No response

Originally created by @Ks2wAu89jnEgCR0bGUAA on GitHub (Aug 2, 2025). ### Feature Description Is it currently possible to mirror a Git repository that is only accessible via Tor (i.e., a .onion address)? I’ve been experimenting with the repository mirroring feature, but it seems to only work with clearnet URLs or authenticated services reachable over the regular internet. Some repositories, especially those focused on anonymity, censorship resistance, or privacy are only hosted as Tor hidden services. I'd like to be able to mirror them into a Gitea instance, either for backup or broader access by non-Tor users. If this isn't currently supported, would it be possible to consider this as a feature request? Suggested feature: Allow Gitea to mirror repositories over Tor by integrating Tor connectivity (e.g., using a local Tor SOCKS5 proxy). Perhaps add configuration options in the admin panel or environment variables to enable Tor routing for mirroring. This would be useful for privacy-focused communities, archiving decentralized content, and improving interoperability between clearnet and darknet development efforts. ### Screenshots _No response_
GiteaMirror added the type/proposal label 2025-11-02 11:23:53 -06:00
Author
Owner

@Ks2wAu89jnEgCR0bGUAA commented on GitHub (Aug 3, 2025):

This worked
Docker compose for gitea with ability to mirror tor repos from host's tor proxy. Gui at port 1234 (can be changed)

services:
  server:
    image: docker.gitea.com/gitea:latest
    container_name: gitea
    environment:
      - USER_UID=1000
      - USER_GID=1000
      - GITEA__database__DB_TYPE=postgres
      - GITEA__database__HOST=127.0.0.1:5432
      - GITEA__database__NAME=gitea
      - GITEA__database__USER=gitea
      - GITEA__database__PASSWD=insertSAMEstrongpasswordhere
      - GITEA__proxy__PROXY_URL=socks5h://127.0.0.1:9050
      - GITEA__proxy__PROXY_ENABLED=true
      - GITEA__proxy__PROXY_HOSTS=*.onion
      - GITEA__webhook__PROXY_HOSTS=*.onion
      - GITEA__webhook__DELIVER_TIMEOUT=30
      - GITEA__webhook__PROXY_URL=socks5h://127.0.0.1:9050
      - GITEA__git.config__http.proxy=socks5h://127.0.0.1:9050
      - GITEA__git.config__https.proxy=socks5h://127.0.0.1:9050
      - GITEA__migrations__ALLOWED_DOMAINS=*
      - GITEA__migrations__ALLOW_LOCAL_NETWORKS=true
      - GITEA__migrations__SKIP_TLS_VERIFY=true
      - GITEA__migrations__BLOCKED_DOMAINS=
      - GITEA__server__HTTP_PORT=1234
    restart: always
    network_mode: host
    volumes:
      - ./gitea:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
#    ports:
#      - "127.0.0.1:1234:3000"
#      - "222:22"
    depends_on:
      - gitea-db

  gitea-db:
    image: docker.io/library/postgres:latest
    container_name: gitea-db
    restart: always
    environment:
      - POSTGRES_USER=gitea
      - POSTGRES_PASSWORD=insertSAMEstrongpasswordhere
      - POSTGRES_DB=gitea
    ports:
      - "5432:5432"
    volumes:
      - ./postgres:/var/lib/postgresql/data
 
@Ks2wAu89jnEgCR0bGUAA commented on GitHub (Aug 3, 2025): This worked Docker compose for gitea with ability to mirror tor repos from host's tor proxy. Gui at port 1234 (can be changed) ``` services: server: image: docker.gitea.com/gitea:latest container_name: gitea environment: - USER_UID=1000 - USER_GID=1000 - GITEA__database__DB_TYPE=postgres - GITEA__database__HOST=127.0.0.1:5432 - GITEA__database__NAME=gitea - GITEA__database__USER=gitea - GITEA__database__PASSWD=insertSAMEstrongpasswordhere - GITEA__proxy__PROXY_URL=socks5h://127.0.0.1:9050 - GITEA__proxy__PROXY_ENABLED=true - GITEA__proxy__PROXY_HOSTS=*.onion - GITEA__webhook__PROXY_HOSTS=*.onion - GITEA__webhook__DELIVER_TIMEOUT=30 - GITEA__webhook__PROXY_URL=socks5h://127.0.0.1:9050 - GITEA__git.config__http.proxy=socks5h://127.0.0.1:9050 - GITEA__git.config__https.proxy=socks5h://127.0.0.1:9050 - GITEA__migrations__ALLOWED_DOMAINS=* - GITEA__migrations__ALLOW_LOCAL_NETWORKS=true - GITEA__migrations__SKIP_TLS_VERIFY=true - GITEA__migrations__BLOCKED_DOMAINS= - GITEA__server__HTTP_PORT=1234 restart: always network_mode: host volumes: - ./gitea:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro # ports: # - "127.0.0.1:1234:3000" # - "222:22" depends_on: - gitea-db gitea-db: image: docker.io/library/postgres:latest container_name: gitea-db restart: always environment: - POSTGRES_USER=gitea - POSTGRES_PASSWORD=insertSAMEstrongpasswordhere - POSTGRES_DB=gitea ports: - "5432:5432" volumes: - ./postgres:/var/lib/postgresql/data ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14829