Forum Discussion
AN IRULE THAT INCLUDES ANOTHER PORT AS PART OF CONNECT METHOD PLUS 443
I'm using my LTM as transparent proxy for my users to get to the internet. How do i include a non-standard port in the CONNECT method list,apart from 443.
This is the current irule, i want to include another port, say 5057 to the list.
First check to see what method we're handling through the proxy.
We need to process CONNECT a little differently than other HTTP proxy
methods, and we need to discard requests that come through with
unsupported methods.
Coming out of this section will be:
- $host : hostname or bare IP address requested
- $port : port of the connection requested
- $new_path : normalized URI with the proxy format stripped
switch -- [HTTP::method] {
"CONNECT" {
set is_http 0
set is_https 0
set request_log_line ""
set original_request [HTTP::uri]
set host [string tolower [getfield [HTTP::uri] ":" 1]]
set port [getfield [HTTP::uri] ":" 2]
if {$port eq ""}{
set port 443
}
set new_path [HTTP::uri]
HTTP::header remove "Proxy-Connection"
HTTP::cookie remove "MRHSession"
if { $static::proxy_debug_L4_VIP_GPRS_TRANSPARENT } { log local0. "Connect request from $host to $port." }
set http_version [HTTP::version]
set is_connect 1
set is_https 1
}
- Ilian_IvanovNimbostratus
Hello,
The iRule is choosing what port to use based on the request. If in the port is specified in the URL, the iRule will use that port. If no port is specified in the URL then 443 will be selected.
So if the URL is https://website.com:8443, the iRule will set port 8443. But if the URL is https://website.com, 443 will be selected.
Which one do you want to change and in what condition?
Regards
Recent Discussions
Related Content
* 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