新聞中心
網(wǎng)上較多HTTP/SSH復(fù)用,但實際環(huán)境中,使用HAPROXY做IIS負(fù)載均衡時,還需要使用80端口來使用遠(yuǎn)程桌面管理服務(wù)器。
成都創(chuàng)新互聯(lián)憑借在網(wǎng)站建設(shè)、網(wǎng)站推廣領(lǐng)域領(lǐng)先的技術(shù)能力和多年的行業(yè)經(jīng)驗,為客戶提供超值的營銷型網(wǎng)站建設(shè)服務(wù),我們始終認(rèn)為:好的營銷型網(wǎng)站就是好的業(yè)務(wù)員。我們已成功為企業(yè)單位、個人等客戶提供了成都做網(wǎng)站、成都網(wǎng)站建設(shè)、成都外貿(mào)網(wǎng)站建設(shè)服務(wù),以良好的商業(yè)信譽,完善的服務(wù)及深厚的技術(shù)力量處于同行領(lǐng)先地位。
近日通過Wireshark抓包,找到了TPKT的報頭字段,終于成功實現(xiàn)RDP協(xié)議復(fù)用:
注:通常RDP使用TPKT作為其傳輸協(xié)議,TPKT運行在TCP之上。 當(dāng)用于傳輸RDP時,使用的TCP端口是3389,而不是正常的TPKT端口102。
參考文獻:
http://blog.csdn.net/kevin_bobolkevin/article/details/50790967
TPKT通訊說明
https://wenku.baidu.com/view/9f509844e2bd960591c67723.html
最終配置文件如下,供參考:
------------------------------------------------------
global
daemon
user haproxy
group haproxy
maxconn 49985
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
# tune.ssl.default-dh-param 2048
defaults
mode tcp
log global
log 127.0.0.1 local0 err
option tcplog
option dontlog-normal
timeout connect 10s
timeout queue 30s
timeout client 15m
timeout client-fin 15m
timeout server 15m
timeout tunnel 12h
listen monitor
bind *:8888
#監(jiān)聽端口
mode http
#http的7層模式
log global
log 127.0.0.1 local0 err
maxconn 5
option httplog
stats enable
stats uri /
stats refresh 15s
timeout connect 10s
timeout queue 30s
timeout client 30s
timeout server 30s
listen http
bind *:80
maxconn 800
timeout client 1h
tcp-request inspect-delay 2s
acl is_http req.payload(0,3) -m bin 474554 504f53 505554 44454c
acl is_ssh req.payload(0,3) -m bin 535348
acl is_rdp req.payload(0,3) -m bin 030000
tcp-request content accept if is_http
# use_backend http if is_http
use_backend ssh if is_ssh
use_backend rdp if is_rdp
#監(jiān)聽端口
option tcpka
#是否允許客戶端發(fā)送tcp keepalive 包,這個和http 的keepalive 沒有關(guān)系
#option redispatch
#是否允許失敗后重新分配session 這個設(shè)置會存在返回的K/3CLOUD系統(tǒng)的session id變化導(dǎo)致閃退。可能的原因服務(wù)端有異?;蛘邆鬏敵霈F(xiàn)了異常
option abortonclose
#當(dāng)服務(wù)器負(fù)載很高的時候,自動結(jié)束掉當(dāng)前隊列處理比較久的鏈接
#tcp-request inspect-delay 30s
hash-type consistent
balance roundrobin
stick-table type ip size 10240k expire 24h
stick on src
server server01 192.168.90.121:80 weight 100 check agent-check agent-port 3333 minconn 0 maxconn 250 on-marked-down shutdown-sessions
server server02 192.168.90.122:80 weight 100 check agent-check agent-port 3333 minconn 0 maxconn 250 on-marked-down shutdown-sessions
backend ssh
mode tcp
timeout server 1h
server server-ssh 192.168.90.126:22
backend rdp
mode tcp
timeout server 1h
server server-mstsc 192.168.90.121:3389
名稱欄目:使用haproxy實現(xiàn)http/ssh/mstsc復(fù)用
網(wǎng)站URL:http://fisionsoft.com.cn/article/jphcoi.html