Skip Navigation
How to make HAProxy redirect traffic via a certain sub-proxy depending on URL?
  • There're 2 conditions in my question. In the links the solutions described are partial, though. A part of a part. That is, "how to identify a keyword", "how to redirect if ...".

    But how to actually put them all together? For instance, how to merge "if a keyword then redirect via a pre-specified, random sub-proxy"? How to them add into all that "otherwise, use no proxy"?

  • How to make HAProxy redirect traffic via a certain sub-proxy depending on URL?

    I have a server (S-1) with HAProxy and a number of residential proxies (PR-s) as login-passwords-port. There're multiple users who will connect to the internet via S-1.

    I want to have HAProxy to forward incomming traffic of the users via a random proxy amoung PR-s with 2 conditions:

    1. only when there's certain, pre-defined keyword in the URL, traffic must be routed via a proxy.
    2. In all other cases, it must go to a requested resource directly as is, without a proxy

    How would I implement this?

    ---

    (1) client -> HaProxy -> if keyword --> sub-proxy (random) -> website

    (2) client -> HaProxy -> if no keyword --> website

    6
    Any variable that contains unique request_id or anything similar?

    In Squid config, is there any variable - %VAR - that contains the current unique request id or anything similar?

    I'll need to pass that into an external script, for instance:

    ```

    squi.conf

    auth_param basic program %REQUEST_ID(???) /etc/squid/my_auth.py ```

    This may not be an authentication script, this is just an example.

    I've searched but haven't found anything about it.

    2
    Vaccines don’t cause autism, but the lie won’t die. In fact, it’s getting worse.
  • The new vaccines generate lots of profits for the pharma. Therefore, what incentives will ALWAYS there be for the owners and creators of the vaccines? Not vacciness in general, but SOME vacciness, against SOME diseases-19.

    Would or could they, the pharma, ever reveal that some vaccines, especially their own, especially the newest ones, may be harmful to people in any way? That they could cause delayed negatives consequences and side-effects?

    Therefore, who, or ironically WHO, has all the incesitves to always try to prove that all the negative data about the newest vaccines is a lie? And "in fact, it's getting worse". Yeah, worse for the those manufacture the vacciness and try to jab people like pigs :)

    This may not prove that they, the vaccines, are or may be indeed harmful. Or not that all of them, for all people, not against all the viruses. Nonetheless, the incentive of hidding the truth about this exists and for one side only.

  • How to report back to Squid which peer to use?

    Let's say, I have a python script which handles ACL:

    ``` #squid.conf

    [............]

    sub-proxies/peers

    cache_peer 01.01.01.99 parent 34433 0 no-query no-digest name=peer1 cache_peer 01.01.02.99 parent 34433 0 no-query no-digest name=peer2 cache_peer 01.01.03.99 parent 34433 0 no-query no-digest name=peer3 cache_peer 01.01.04.99 parent 34433 0 no-query no-digest name=peer4

    external_acl_type my_acl_helper ttl=30 %LOGIN ./my_acl_helper.py acl session_acl external my_acl_helper

    [............]

    ```

    In my_acl_helper.py there's some tricky logic of selecting a peer to be used for a request.

    How should my_acl_helper.py report back to Squid which peer it's choosen? In what format? As far as I've found out, it could only be OK or ERR. But the IP:port or the alias of a peer will be needed as well. How?

    1
    InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)MA
    maximalian @sopuli.xyz
    Posts 3
    Comments 8