Forum Discussion
What_Lies_Bene1
Sep 27, 2013Cirrostratus
I'll knock up a much improved version shortly but this will suffice for now;
when CLIENT_DATA {
set user [regexp -inline {(?:USER\ )(\S+)} [TCP::payload]]
if { [string length $user] > 2 } {
if { [string match -nocase {s1.*} $user] > 0 } {
username started with s1, go to node 1
pool FTP_prod_pool member 10.x.x.1 }
elseif { [string match -nocase {s2.*} $user] > 0 } {
username started with s1, go to node 1
pool FTP_prod_pool member 10.x.x.1 }
elseif { [string match -nocase {s3.*} $user] > 0 } {
username started with s1, go to node 1
pool FTP_prod_pool member 10.x.x.1 }
elseif { [string match -nocase {s4.*} $user] > 0 } {
username started with s1, go to node 1
pool FTP_prod_pool member 10.x.x.1 }
else {
username didn't start with s1-, must be s2-, go to node 2
pool FTP_prod_pool member 10.x.x.2 }
}
TCP::release
}