I found this question in a google search that nobody replied to, but am wondering if anyone knows if this now works, or what the answer may be to relay traffic to multiple servers.
This was my reason for only using relayd to redirect tcp traffice to nginx, but if this works, then I'll drop nginx altogether.
pf.conf
This was my reason for only using relayd to redirect tcp traffice to nginx, but if this works, then I'll drop nginx altogether.
Code:
ext_addr="10.200.1.2"
host1="192.168.4.10"
host2="192.168.4.24"
table <table_one> { $host1 }
table <table_two> { $host2 }
http protocol "one_web" {
request header expect "one.domain.tld" from "Host"
}
http protocol "two_web" {
request header expect "two.domain.tld" from "Host"
}
relay relay_one {
listen on $ext_addr port http
protocol "onw_web"
forward to <table_one> check tcp
}
relay relay_two {
listen on $ext_addr port http
protocol "two_web"
forward to <table_two> check tcp
}
Code:
rdr-anchor "relayd/*"
anchor "relayd/*"