Using a proxy server with self-hosted runners

You can configure self-hosted runners to use a proxy server to communicate with GitHub AE.

Aviso: Os executores auto-hospedados estão atualmente desabilitados para GitHub AE. Isso porque GitHub AE oferece garantias para as fronteiras de segurança que são incompatíveis com a forma como os executores hospedados funcionam. No entanto, se você precisar usar executores auto-hospedados com GitHub AE e entender as implicações de segurança, você poderá entrar em contato com o suporte de GitHub para uma exceção de segurança que irá habilitar executores auto-hospedados.

Se você não precisar de executores auto-hospedados, você poderá usar AE hosted runners para executar seus fluxos de trabalho. Para obter mais informações, consulte "Sobre AE hosted runners".

Observação: GitHub Actions está atualmente na versão beta para GitHub AE.

Configuring a proxy server using environment variables

If you need a self-hosted runner to communicate via a proxy server, the self-hosted runner application uses proxy configurations set in the following environment variables:

  • https_proxy: Proxy URL for HTTPS traffic. You can also include basic authentication credentials, if required. For example:
    • http://proxy.local
    • http://192.168.1.1:8080
    • http://username:password@proxy.local
  • http_proxy: Proxy URL for HTTP traffic. You can also include basic authentication credentials, if required. For example:
    • http://proxy.local
    • http://192.168.1.1:8080
    • http://username:password@proxy.local
  • no_proxy: Comma separated list of hosts that should not use a proxy. Only hostnames are allowed in no_proxy, you cannot use IP addresses. For example:
    • example.com
    • example.com,myserver.local:443,example.org

The proxy environment variables are read when the self-hosted runner application starts, so you must set the environment variables before configuring or starting the self-hosted runner application. If your proxy configuration changes, you must restart the self-hosted runner application.

On Windows machines, the proxy environment variable names are not case-sensitive. On Linux and macOS machines, we recommend that you use all lowercase environment variables. If you have an environment variable in both lowercase and uppercase on Linux or macOS, for example https_proxy and HTTPS_PROXY, the self-hosted runner application uses the lowercase environment variable.

The connection between self-hosted runners and GitHub AE is over HTTP (port 80) and HTTPS (port 443).

Using a .env file to set the proxy configuration

If setting environment variables is not practical, you can set the proxy configuration variables in a file named .env in the self-hosted runner application directory. For example, this might be necessary if you want to configure the runner application as a service under a system account. When the runner application starts, it reads the variables set in .env for the proxy configuration.

An example .env proxy configuration is shown below:

https_proxy=http://proxy.local:8080
no_proxy=example.com,myserver.local:443

Setting proxy configuration for Docker containers

If you use Docker container actions or service containers in your workflows, you might also need to configure Docker to use your proxy server in addition to setting the above environment variables.

For information on the required Docker configuration, see "Configure Docker to use a proxy server" in the Docker documentation.

Esse documento ajudou você?

Política de Privacidade

Ajude-nos a tornar esses documentos ótimos!

Todos os documentos do GitHub são de código aberto. Você percebeu que algo que está errado ou não está claro? Envie um pull request.

Faça uma contribuição

Ou, aprenda como contribuir.