« Haproxy : Reverse Proxy Tcp » : différence entre les versions

De www.yakakliker.org
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 67 : Ligne 67 :
   kofiWidgetOverlay.draw('yakakliker', {
   kofiWidgetOverlay.draw('yakakliker', {
     'type': 'floating-chat',
     'type': 'floating-chat',
     'floating-chat.donateButton.text': 'Donate',
     'floating-chat.donateButton.text': 'Café',
     'floating-chat.donateButton.background-color': '#00b9fe',
     'floating-chat.donateButton.background-color': '#00b9fe',
     'floating-chat.donateButton.text-color': '#fff'
     'floating-chat.donateButton.text-color': '#fff'

Version du 21 janvier 2025 à 14:47

Dans certains cas, le reverse proxy Tcp s'impose. Voici la configuration type

frontend MonTCP
    mode tcp
    bind *:3306
          
    default_backend TSE

backend TSE
    mode tcp
    balance leastconn
    server S1 192.168.1.50:3306 check
    server S2 192.168.2.50:3306 check
    stick-table type ip size 1m expire 30m

Exemple avec plusieurs backends

frontend SSL

mode tcp
bind *:443

tcp-request inspect-delay 5s
tcp-request content accept if { req_ssl_hello_type 1 }

use_backend backend1 if { req_ssl_sni -i site01.yakakliker.org }
use_backend backend2 if { req_ssl_sni -i site02.yakakliker.org }
use_backend bbackend3 if { req_ssl_sni -i site03.yakakliker.org }


backend backend1
mode tcp
server server1 192.168.0.100:443 check

backend backend2
mode tcp
server server2 192.168.0.101:443 check

backend backend3
mode tcp
server server3 192.168.0.102:443 check


Lien

https://www.haproxy.com/documentation/haproxy-configuration-tutorials/load-balancing/tcp/

https://discourse.haproxy.org/t/haproxy-forwarding-https-ok-tcp-not-ok-please-help/3872/5

https://www.haproxy.com/blog/introduction-to-haproxy-stick-tables

https://www.haproxy.com/documentation/haproxy-configuration-tutorials/core-concepts/stick-tables/

https://discourse.haproxy.org/t/mixing-mode-tcp-and-http-ssl-termination-and-passthrough/2698/16