Difference between revisions of "Proxy"

From Dreamwidth Notes
Jump to: navigation, search
Line 3: Line 3:
 
To enable the proxy, set these in your config:
 
To enable the proxy, set these in your config:
  
 +
<source lang="perl">
 
$PROXY_SALT_FILE = "$HOME/ext/local/etc/proxy-salt";
 
$PROXY_SALT_FILE = "$HOME/ext/local/etc/proxy-salt";
 
$PROXY_URL = "https://proxy.hack.dw";
 
$PROXY_URL = "https://proxy.hack.dw";
 +
</source>
  
 
You'll need to create the `proxy-salt` file. Contents of `proxy-salt` are just a string, preferrably long with randomly generated characters.
 
You'll need to create the `proxy-salt` file. Contents of `proxy-salt` are just a string, preferrably long with randomly generated characters.
  
You'll also want something in front of the proxy to handle https negotiation. I recommend nginx. Sample config that will work:
+
You'll also want something in front of the proxy to handle https negotiation. I recommend nginx. Sample config that will work:
  
  

Revision as of 19:33, 14 May 2015

Code for the proxy is located in $LJHOME/src/proxy.

To enable the proxy, set these in your config:

$PROXY_SALT_FILE = "$HOME/ext/local/etc/proxy-salt";
$PROXY_URL = "https://proxy.hack.dw";

You'll need to create the `proxy-salt` file. Contents of `proxy-salt` are just a string, preferrably long with randomly generated characters.

You'll also want something in front of the proxy to handle https negotiation. I recommend nginx. Sample config that will work:


    server {
        listen       443 ssl;
        server_name  proxy.hack.dw;
 
        sendfile     off;
 
        location / {
            proxy_pass http://127.0.0.1:6250;
            proxy_redirect off;
        }
    }


(for dev) Make sure you've also got an /etc/hosts entry for `proxy.hack.dw`.