Options to send outbound HTTP requests via a HTTP proxy #2007

Closed
opened 2025-11-02 04:21:00 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @silverwind on GitHub (Jul 4, 2018).

To mirror a HTTPS-hosted repository, I recently had the need to send outbound HTTP requests from gitea via a HTTP proxy server, but found that gitea does not seem to come with a configuration option to define such a proxy.

I imagine we could have options like this (prefixed with OUTBOUND to avoid confusion with options concerning inbound requests):

[server]
OUTBOUND_HTTP_PROXY=https://1.2.3.4
OUTBOUND_HTTPS_PROXY=https://1.2.3.4
Originally created by @silverwind on GitHub (Jul 4, 2018). To mirror a HTTPS-hosted repository, I recently had the need to send outbound HTTP requests from gitea via a HTTP proxy server, but found that gitea does not seem to come with a configuration option to define such a proxy. I imagine we could have options like this (prefixed with OUTBOUND to avoid confusion with options concerning inbound requests): ``` [server] OUTBOUND_HTTP_PROXY=https://1.2.3.4 OUTBOUND_HTTPS_PROXY=https://1.2.3.4 ````
GiteaMirror added the type/proposaltype/feature labels 2025-11-02 04:21:00 -06:00
Author
Owner

@lafriks commented on GitHub (Jul 4, 2018):

Isn't gitea using if you export environment variables like this before starting gitea (on linux):

 export http_proxy=http://1.2.3.4:8080/
 export https_proxy=$http_proxy

On windows it also should be using system proxy settings I think

@lafriks commented on GitHub (Jul 4, 2018): Isn't gitea using if you export environment variables like this before starting gitea (on linux): ``` export http_proxy=http://1.2.3.4:8080/ export https_proxy=$http_proxy ``` On windows it also should be using system proxy settings I think
Author
Owner

@silverwind commented on GitHub (Jul 5, 2018):

export environment variables

Thanks, this worked for me. Shall we close this issue?

@silverwind commented on GitHub (Jul 5, 2018): > export environment variables Thanks, this worked for me. Shall we close this issue?
Author
Owner

@lafriks commented on GitHub (Jul 5, 2018):

Yes, I think it can be closed as no need to reinvent wheel if OS already provides such functionality

@lafriks commented on GitHub (Jul 5, 2018): Yes, I think it can be closed as no need to reinvent wheel if OS already provides such functionality
Author
Owner

@silverwind commented on GitHub (Jul 5, 2018):

Actually, it's not the OS providing this, but golang itself ;)

@silverwind commented on GitHub (Jul 5, 2018): Actually, it's not the OS providing this, but golang itself ;)
Author
Owner

@lafriks commented on GitHub (Jul 5, 2018):

in Gitea case yes, GoLang provides that but other utilities will use it also so it's system-wide setting :)

@lafriks commented on GitHub (Jul 5, 2018): in Gitea case yes, GoLang provides that but other utilities will use it also so it's system-wide setting :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2007