1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

proxy tunnel

Discussion in 'Apache' started by softy, Jun 15, 2018.

  1. #1
    Hello eveyone,

    I am trying to run a chatscript on our server apache/ubuntu the site is SSL enabled
    everything works fine but one of my content is being blocked by major browsers due to mix-content error

    Mixed Content: The page at '<URL>' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws:<URL>/websocket'. This request has been blocked; this endpoint must be available over WSS.
    Code (markup):
    The script is a javascript and I tried to change the prefix from WS to WSS but it didnt help, after a bit of research I came to know that we can use Proxy Tunnel.
    Can someone tell me where to begin, and how to setup a proxy tunnel so it can convert WS to WSS ?

    thank you for you time
     
    softy, Jun 15, 2018 IP
  2. hostechsupport

    hostechsupport Well-Known Member

    Messages:
    413
    Likes Received:
    23
    Best Answers:
    7
    Trophy Points:
    138
    #2
    A Proxy Auto-Configuration (PAC) file is a JavaScript function which figure's out whether web browser requests HTTPS, HTTPS & FTP move straight to the destination or directly to the internet proxy server. The JavaScript function included in the PAC file explains the function:

    The auto-config file must be saved to a .pac filename extension:

    proxy.pac

    And the MIME type set to:

    application/x-ns-proxy-autoconfig

    The file includes a function named FindProxyForURL. The illustration given below well describes in which the internal DNS server is set up so that it can only resolve internal host names and the goal is to use a proxy only for hosts that can't be resolved.

    function FindProxyForURL(url, host) {
    if (isResolvable(host))
    return "DIRECT";
    else
    return "PROXY proxy.mydomain.com:8080";
    }

    hope this helps :)
     
    hostechsupport, Jun 15, 2018 IP