Forum Discussion
ShakeelRashid
Nimbostratus
Mar 05, 2018Non HTTP Traffic Stream Profile
Hi All,
I'm having a weird issue with a very simple stream profile I have attached to a VS. The profile looks for an occurrence of an IP address in the data and replaces it with its own VS IP a...
Stanislas_Piro2
Cumulonimbus
Mar 05, 2018You can try with this code (not tested)
when CLIENT_ACCEPTED {
set collected_length 0
set virtual_ip [IP::local_addr]
}
when SERVER_CONNECTED {
TCP::collect
}
when SERVER_DATA {
set tns_data [TCP::payload]
if {[set host_start [string first "HOST" $tns_data ]] != -1} {
set host_end [string first ")" $tns_data $host_start]
set collected_length [expr {$collected_length + [TCP::payload length]}]
TCP::payload replace $host_start $host_end "HOST=$virtual_ip)"
}
TCP::release
if {$collected_length < 2048} {
TCP::collect
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects