Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

436
Visualizações
Get real ip from listener with nginx proxy

I try to make proxy icecast/shoutcast radio with nginx and get real ip from listener.

If i put localhost ip

location /exampleradio/ {
    proxy_buffering           off;
    proxy_ignore_client_abort off;
    proxy_intercept_errors    on;
    proxy_next_upstream       error timeout invalid_header;
    proxy_redirect            off;
    proxy_connect_timeout     60;
    proxy_send_timeout        21600;
    proxy_read_timeout        21600;

    proxy_set_header Host 127.0.0.1:8000;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;

    proxy_pass http://127.0.0.1:8000;
}

the listener ip it shows correctly,

When i put another radio from another server example:

location /exampleradio1/ {
    proxy_buffering           off;
    proxy_ignore_client_abort off;
    proxy_intercept_errors    on;
    proxy_next_upstream       error timeout invalid_header;
    proxy_redirect            off;
    proxy_connect_timeout     60;
    proxy_send_timeout        21600;
    proxy_read_timeout        21600;

    proxy_set_header Host cast.example.com:8000;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;

    proxy_pass http://cast.example.com:8000;
}

the listener ip on another server it shows the server ip and no listener ip. How can i solve this and get listener ip and no server ip?

Thanks.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The only server that supports "X-Forwarded-For" header is Icecast-kh.

Switch to Icecast-kh, leave your Nginx config as is and don't forget to add

<x-forwarded-for>_PROXY IP HERE_</x-forwarded-for>

to your Icecast-kh config.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda