Forum Discussion

lizunjjg_280139's avatar
lizunjjg_280139
Icon for Nimbostratus rankNimbostratus
Jan 24, 2017

Wechat persistence irules!!

 

This is an http post packet(WeChat source code), Use {Fromusername} for session hold(persistence).

 

a lot of thanks

 

9 Replies

  • This is an http post packet,(WeChat source code) Use {FromUserName} sessionhold(persistence)

     

  • This is an http post packet(WeChat source code), Use {Fromusername} for session hold(persistence).

     

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    1) Local Traffic ›› Profiles : Services : XML : click on Create

    to create an XML profile, and specify xpath with "FromUserName";

    2) Attach the xml profile to the virtual server;

    3) Attach the following irule to the virtual server:

    when XML_CONTENT_BASED_ROUTING {
        for {set i 0} { $i < $XML_count } {incr i} {
            log local0. $XML_queries($i)
            log local0. $XML_values($i)
            if {($XML_queries($i) contains "FromUserName")} {
                persist uie $XML_values($i) 0
            }
        }
    }
    when LB_SELECTED {
        log local0. "Pool member selected: [LB::server addr]"
    }
    

    (This is untested.)