1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Untrusted Http Client

Discussion in 'XenForo Questions and Support' started by Sunka, Feb 23, 2016.

  1. Sunka

    Sunka Well-Known Member

    Regarding this in newest xenforo version, could someone give some examples and elaborate this option little more.
    My forum is on https and I am running xenforo proxy for images.

    Thank you
     
    RoldanLT likes this.
  2. RoldanLT

    RoldanLT Well-Known Member

    • $config['untrustedHttpClient'] - default: array()
      When XenForo makes an HTTP call to an untrusted external server, you may specify a specific adapater configuration. For example, this allows you to use an HTTP proxy service to stop your application server's IP from being leaked. The value should be an adapter configuration array like given in this Zend_Http_Client_Adapter_Proxy example.
    https://xenforo.com/help/config-php-options/
     
    Sunka and SneakyDave like this.
  3. Mike

    Mike XenForo Developer Staff Member

    As an example of that configuration:
    Code:
    $config['untrustedHttpClient'] = array(
       'adapter' => 'Zend_Http_Client_Adapter_Proxy',
       'proxy_host' => '123.123.123.123',
       'proxy_port' => 80
    );
    You'll need an HTTP proxy to access (either one you run on a different server or an external one).
     
    Sunka, eva2000 and RoldanLT like this.
  4. RoldanLT

    RoldanLT Well-Known Member

    Just a plain web server will do?
    Or do we need some sort of script to be run on proxy server?
    Thanks!
     
    Sunka likes this.
  5. SneakyDave

    SneakyDave Well-Known Member

    BUG BUG "adapter" is spelled wrong.
     
  6. RoldanLT

    RoldanLT Well-Known Member

  7. Mike

    Mike XenForo Developer Staff Member

    It needs to be an HTTP proxy. This can be done through a regular web server if you configure it like that. Or it can be done through a dedicated proxy (Squid, https://tinyproxy.github.io/, etc). I don't have experience with setting any of them up so I can't comment on that.
     
    Sunka and RoldanLT like this.
  8. RoldanLT

    RoldanLT Well-Known Member

    Sunka likes this.
  9. eva2000

    eva2000 Well-Known Member

    @Mike is the image proxy the only thing that takes advantage of the untrusted HttpClient setup right now ? or other Xenforo features ?
     
  10. Chris D

    Chris D XenForo Developer Staff Member

    Image proxy and auto linking stuff in XF.

    It's also used in XFMG from version 1.1.5 with XF 1.5.6 or above installed for everything from automatically grabbing titles, to downloading video thumbnails, to adding media from URLs etc.
     
    eva2000 likes this.
  11. eva2000

    eva2000 Well-Known Member

    thanks @Chris D :)
     
  12. tr1cky

    tr1cky Member

    What happens when the proxy is down? Will xenforo fetch the Images directly from the backend?
     
  13. Jaw.sh

    Jaw.sh Member

    No, the query fails and it displays an error icon.
     
  14. tr1cky

    tr1cky Member

    Good. So it's safe to use this option and the built-in xenforo imageproxy?
     
  15. Jaw.sh

    Jaw.sh Member

    Yes. On my website, it's critical the PHP Daemon servers do not expose their IP, yet I also want to protect users from IP logging pixels. I am using a Squid3 proxy on a spare server to fish image content for me.
     
  16. eva2000

    eva2000 Well-Known Member

  17. tr1cky

    tr1cky Member

  18. eva2000

    eva2000 Well-Known Member

    RoldanLT likes this.

Share This Page