home.social

#fastcgi — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #fastcgi, aggregated by home.social.

  1. [Перевод] FastCGI исполнилось 30 лет, и он до сих пор лучше HTTP для прокси-к-бэкенду

    Знаете, кому 29 апреля стукнуло 30 лет? Спецификации FastCGI. Тридцать лет с 1996 года. Погодите. Эта заметка не про ностальгию по .fcgi -скриптам, которые на каждый запрос форкали отдельный процесс и которыми сегодня никто не пользуется. И не про CGI вообще. Разговор о другом. У нас всех в проде между прокси и бэкендом обычно стоит HTTP. nginx перед Go-приложением, Caddy перед Python-сервисом, Apache перед PHP-FPM, неважно, поверх там HTTP/1.1 или HTTP/2. И вот Эндрю Айер на agwa.name к юбилею FastCGI собрал аргументы, что этот участок инфраструктуры всё это время сидит на не самом удачном протоколе. Айер основатель SSLMate, и в SSLMate всё крутится на FastCGI в проде уже больше десяти лет. Так что пишет не теоретически. Заметка короткая и по делу. HN-тред собрал сотню комментариев , для 2026 года это не топ, но там пишут люди, которые знают, о чём говорят. Если попроще, аргумент такой: у HTTP как протокола между прокси и бэкендом есть два структурных бага, которых у FastCGI нет, и индустрия за тридцать лет так и не нашла повода переехать. А обсуждение в треде ушло дальше: почему вообще HTTP победил, если он хуже технически. И ответ оказался любопытнее самого аргумента.

    habr.com/ru/articles/1030882/

    #fastcgi #http #reverseproxy #request_smuggling #desync #nginx #webинфраструктура #прокси

  2. FastCGI: 30 Years Old and Still the Better Protocol for Reverse Proxies by @agwa

    How to avoid getting pwned by request smuggling and untrusted headers.

    agwa.name/blog/post/fastcgi_is

    #infosec #FastCGI #PHPFPM #PHP

  3. FastCGI: 30 Years Old and Still the Better Protocol for Reverse Proxies by @agwa

    How to avoid getting pwned by request smuggling and untrusted headers.

    agwa.name/blog/post/fastcgi_is

  4. FastCGI: 30 Years Old and Still the Better Protocol for Reverse Proxies by @agwa

    How to avoid getting pwned by request smuggling and untrusted headers.

    agwa.name/blog/post/fastcgi_is

    #infosec #FastCGI #PHPFPM #PHP

  5. FastCGI: because nothing says "cutting-edge technology" like a dusty, 30-year-old protocol that's totally not stuck in the past. 😂 Apparently, the solution to modern reverse proxy issues is to drag out the old relics and pray they work better than your grandpa's broken record player. 🎶🔄
    agwa.name/blog/post/fastcgi_is #FastCGI #outdated #technology #reverseproxy #techhumor #HackerNews #ngated

  6. TIL Network protocols Sans I/O ⚡

    “… network protocol implementations written in Python that perform no I/O (this means libraries that operate directly on text or bytes; this excludes libraries that just abstract out I/O).” 🤯

    Read the reference page 👇
    sans-io.readthedocs.io/

  7. TIL Network protocols Sans I/O ⚡

    “… network protocol implementations written in Python that perform no I/O (this means libraries that operate directly on text or bytes; this excludes libraries that just abstract out I/O).” 🤯

    Read the reference page 👇
    sans-io.readthedocs.io/

    #Reusability #Python #FastCGI #HTTP2 #H11 #IRC #OAuth2 #OAuthLib #WebSocket #SOCKS5 #RFC2217 #SerialOverIP #EPICS #FIX #QUIC #LanguageServerProtocol #SMTP #DBus #ThorlabsAPT #Matrix #SSL #TLS #CPython #multipart #formdata

  8. TIL Network protocols Sans I/O ⚡

    “… network protocol implementations written in Python that perform no I/O (this means libraries that operate directly on text or bytes; this excludes libraries that just abstract out I/O).” 🤯

    Read the reference page 👇
    sans-io.readthedocs.io/

    #Reusability #Python #FastCGI #HTTP2 #H11 #IRC #OAuth2 #OAuthLib #WebSocket #SOCKS5 #RFC2217 #SerialOverIP #EPICS #FIX #QUIC #LanguageServerProtocol #SMTP #DBus #ThorlabsAPT #Matrix #SSL #TLS #CPython #multipart #formdata

  9. TIL Network protocols Sans I/O ⚡

    “… network protocol implementations written in Python that perform no I/O (this means libraries that operate directly on text or bytes; this excludes libraries that just abstract out I/O).” 🤯

    Read the reference page 👇
    sans-io.readthedocs.io/

    #Reusability #Python #FastCGI #HTTP2 #H11 #IRC #OAuth2 #OAuthLib #WebSocket #SOCKS5 #RFC2217 #SerialOverIP #EPICS #FIX #QUIC #LanguageServerProtocol #SMTP #DBus #ThorlabsAPT #Matrix #SSL #TLS #CPython #multipart #formdata

  10. TIL Network protocols Sans I/O ⚡

    “… network protocol implementations written in Python that perform no I/O (this means libraries that operate directly on text or bytes; this excludes libraries that just abstract out I/O).” 🤯

    Read the reference page 👇
    sans-io.readthedocs.io/

    #Reusability #Python #FastCGI #HTTP2 #H11 #IRC #OAuth2 #OAuthLib #WebSocket #SOCKS5 #RFC2217 #SerialOverIP #EPICS #FIX #QUIC #LanguageServerProtocol #SMTP #DBus #ThorlabsAPT #Matrix #SSL #TLS #CPython #multipart #formdata

  11. Man, if #DNSoverHTTPS is just this simple... ​:sagume_think:​

    http://mima.localghost.org/dns/chaotic.ninja/AAAA

    #!/bin/sh
    if [ $REQUEST_METHOD == "GET" ]
    then
        DNS_DOMAIN=$(echo "$QUERY_STRING" |
                     sed -n 's/^.*domain=\([^&]*\).*$/\1/p' |
                     sed "s/%20/ /g")
        DNS_TYPE=$(echo "$QUERY_STRING" |
                   sed -n 's/^.*type=\([^&]*\).*$/\1/p' |
                   sed "s/%20/ /g")
        [ -z $DNS_TYPE ] && DNS_TYPE=A
        if [ -d "$DNS_DOMAIN" ]
        then
            DNS_STATUS="NOERROR"
            LOCAL_REC="$DNS_DOMAIN/$DNS_TYPE"
            [ -e "$LOCAL_REC" ] && DNS_REC=$(cat "$LOCAL_REC")
        else
            DIG_RESPONSE=$(dig +noall +answer +comments "$DNS_DOMAIN" "$DNS_TYPE")
            DNS_STATUS=$(echo "$DIG_RESPONSE" | grep status | cut -d ':' -f 3 | cut -w -f 2 | cut -d ',' -f 1)
            if [ $DNS_STATUS == "NOERROR" ]
            then
                DNS_ANSWER=$(echo "$DIG_RESPONSE" | grep IN)
                DNS_REC=$(echo "$DNS_ANSWER" | cut -w -f 5-)
                DNS_TTL=$(echo "$DNS_ANSWER" | cut -w -f 2)
            fi
        fi
    fi
    
    httpstatus()
    {
        case $1 in
            200) httpsemantic="OK";;
            404) httpsemantic="Not Found";;
        esac
        printf "HTTP/1.0 $1 $httpsemantic\r\n"
        echo "Status: $1 $httpsemantic"
    }
    case $DNS_STATUS in
        "NOERROR")
            if [ ! -z "$DNS_REC" ]
            then
                httpstatus 200
                echo "Cache-Control: private, max-age=$DNS_TTL"
                ANSWER="$DNS_REC"
            else
                httpstatus 404
                ANSWER="NOERROR, but no $DNS_TYPE record"
            fi
            ;;
        "NXDOMAIN")
            httpstatus 404
            ANSWER="$DNS_STATUS"
            ;;
    esac
    
    echo "Content-Type: text/plain"
    echo
    echo "$ANSWER"

    With the following
    #nginx directives too assuming you got a #fastcgi set up already:
    upstream dohexperiment {
        server 127.0.0.1:80;
    }
    
    [...]
    
    location ~ /dns/(.*)/(.*)$ {
            proxy_pass http://dohexperiment/dns/index.cgi?domain=$1&type=$2;
    }
    location ~ /dns/(.*[^\/])$ {
            proxy_pass http://dohexperiment/dns/index.cgi?domain=$1;
    }

    #DNS #HTTP #REST

    RE:
    https://makai.chaotic.ninja/notes/9vyxx3nwty