作者:小王子loving | 来源:互联网 | 2023-06-02 07:24
1.解析cfg文件,形成struct2.cfg文件格式123456789101112131415161718192021222324252627282930313233virtual_server {
1.解析cfg文件,形成struct
2.cfg文件格式
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| virtual_server {
label JuXG-HTTPS
ip 123.103.91.122
port 443
lb_algo rr
lb_kind tun
protocol TCP
real_server {
label RealServer1
ip 123.103.91.115
port 443
weight 100
HTTP_GET {
check_port 80
path 'health'
http_recv 'Welcome to nginx'
connect_timeout 3
}
}
real_server {
label RealServer2
ip 123.103.91.116
port 443
weight 100
HTTP_GET {
check_port 80
path 'health'
http_recv 'Welcome to nginx'
connect_timeout 3
}
}
} |
3.这个cfg文件取自lvs配置,我想获取里面的数据,想问大家有没有方法