Accessing localhost through a proxy











up vote
2
down vote

favorite












A quick background of my situation:

I'm a web developer that frequently uses IIS Express to debug web applications via localhost. I've recently purchased a proxy because I'm about to travel abroad and want to keep a static IP in the process.



My problem:

Each time I try to debug a web app (localhost:port) or go to 127.0.0.1 in my browser I get the following
enter image description here



I've setup my proxy settings as such:
enter image description here

I don't want to bypass for local requests because then it defeats the purpose of my goal as my IP will always change depending where I'm connecting from.



My understanding is that my request is going out to my proxy and then trying to ping 127.0.0.1 (my pc) which seems impossible... I'm not sure, I'm not a networking guy. If it helps, here's my hosts file located in the drivers/etc folder



enter image description here



Is it possible to access my local host via my proxy?










share|improve this question


















  • 1




    absolutely impossible. the only way that will work is if you give up using localhost, and use the external IP address of the machine (and it must be an IP that is visible to the proxy, so if the proxy is on the internet, you will have to port forward to let the traffic back in). Much better to use a proxy switch addon for your browser so you can enable/disable proxying at will. 127.0.0.1 isn't just your loopback address, it is also the proxies, so anything you send to the proxy with 127.0.0.1 as destination will be delivered to the proxy server itself.
    – Frank Thomas
    Sep 26 '16 at 2:46












  • Local requests are actually fine. What I really need is our remote services (such as databases, search indexes etc) always see a static IP. So when I launch these web apps they should be accessing our remote SQL server etc through the proxy.
    – Adrian
    Sep 26 '16 at 3:27












  • it will work if you use any other IP or DNS name if (and only if) the IP and a DNS server hosting the name are accessible to it. the problem you are having is specific to loopback addresses like those in the 127.X.Y.Z range. Any other address will proxy fine as long as the name can be looked up and/or the ip is reachable. are the proxy, DB and web services on the LAN?
    – Frank Thomas
    Sep 26 '16 at 3:41










  • Nope, they are completely remote. The proxy is from blazingseollc.com/proxy while our databases etc are all hosted on AWS. I'm thinking I may have to purchase a cheap machine to run linux and my own proxy from my home. I'm just not 100% confident that would be stable enough if I am moving from country to country.
    – Adrian
    Sep 26 '16 at 3:53












  • in that case am I missing the place where you configure the remote IP of the remote services? as long as you point to the remote servers instead of localhost, and they don't initiate connections to your application, everything should work fine. I'm not understanding why you have configured your host-file in that manner or why you are trying to access remote addresses via your localhost/loopback address.
    – Frank Thomas
    Sep 26 '16 at 4:09

















up vote
2
down vote

favorite












A quick background of my situation:

I'm a web developer that frequently uses IIS Express to debug web applications via localhost. I've recently purchased a proxy because I'm about to travel abroad and want to keep a static IP in the process.



My problem:

Each time I try to debug a web app (localhost:port) or go to 127.0.0.1 in my browser I get the following
enter image description here



I've setup my proxy settings as such:
enter image description here

I don't want to bypass for local requests because then it defeats the purpose of my goal as my IP will always change depending where I'm connecting from.



My understanding is that my request is going out to my proxy and then trying to ping 127.0.0.1 (my pc) which seems impossible... I'm not sure, I'm not a networking guy. If it helps, here's my hosts file located in the drivers/etc folder



enter image description here



Is it possible to access my local host via my proxy?










share|improve this question


















  • 1




    absolutely impossible. the only way that will work is if you give up using localhost, and use the external IP address of the machine (and it must be an IP that is visible to the proxy, so if the proxy is on the internet, you will have to port forward to let the traffic back in). Much better to use a proxy switch addon for your browser so you can enable/disable proxying at will. 127.0.0.1 isn't just your loopback address, it is also the proxies, so anything you send to the proxy with 127.0.0.1 as destination will be delivered to the proxy server itself.
    – Frank Thomas
    Sep 26 '16 at 2:46












  • Local requests are actually fine. What I really need is our remote services (such as databases, search indexes etc) always see a static IP. So when I launch these web apps they should be accessing our remote SQL server etc through the proxy.
    – Adrian
    Sep 26 '16 at 3:27












  • it will work if you use any other IP or DNS name if (and only if) the IP and a DNS server hosting the name are accessible to it. the problem you are having is specific to loopback addresses like those in the 127.X.Y.Z range. Any other address will proxy fine as long as the name can be looked up and/or the ip is reachable. are the proxy, DB and web services on the LAN?
    – Frank Thomas
    Sep 26 '16 at 3:41










  • Nope, they are completely remote. The proxy is from blazingseollc.com/proxy while our databases etc are all hosted on AWS. I'm thinking I may have to purchase a cheap machine to run linux and my own proxy from my home. I'm just not 100% confident that would be stable enough if I am moving from country to country.
    – Adrian
    Sep 26 '16 at 3:53












  • in that case am I missing the place where you configure the remote IP of the remote services? as long as you point to the remote servers instead of localhost, and they don't initiate connections to your application, everything should work fine. I'm not understanding why you have configured your host-file in that manner or why you are trying to access remote addresses via your localhost/loopback address.
    – Frank Thomas
    Sep 26 '16 at 4:09















up vote
2
down vote

favorite









up vote
2
down vote

favorite











A quick background of my situation:

I'm a web developer that frequently uses IIS Express to debug web applications via localhost. I've recently purchased a proxy because I'm about to travel abroad and want to keep a static IP in the process.



My problem:

Each time I try to debug a web app (localhost:port) or go to 127.0.0.1 in my browser I get the following
enter image description here



I've setup my proxy settings as such:
enter image description here

I don't want to bypass for local requests because then it defeats the purpose of my goal as my IP will always change depending where I'm connecting from.



My understanding is that my request is going out to my proxy and then trying to ping 127.0.0.1 (my pc) which seems impossible... I'm not sure, I'm not a networking guy. If it helps, here's my hosts file located in the drivers/etc folder



enter image description here



Is it possible to access my local host via my proxy?










share|improve this question













A quick background of my situation:

I'm a web developer that frequently uses IIS Express to debug web applications via localhost. I've recently purchased a proxy because I'm about to travel abroad and want to keep a static IP in the process.



My problem:

Each time I try to debug a web app (localhost:port) or go to 127.0.0.1 in my browser I get the following
enter image description here



I've setup my proxy settings as such:
enter image description here

I don't want to bypass for local requests because then it defeats the purpose of my goal as my IP will always change depending where I'm connecting from.



My understanding is that my request is going out to my proxy and then trying to ping 127.0.0.1 (my pc) which seems impossible... I'm not sure, I'm not a networking guy. If it helps, here's my hosts file located in the drivers/etc folder



enter image description here



Is it possible to access my local host via my proxy?







networking proxy localhost






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 26 '16 at 2:39









Adrian

11112




11112








  • 1




    absolutely impossible. the only way that will work is if you give up using localhost, and use the external IP address of the machine (and it must be an IP that is visible to the proxy, so if the proxy is on the internet, you will have to port forward to let the traffic back in). Much better to use a proxy switch addon for your browser so you can enable/disable proxying at will. 127.0.0.1 isn't just your loopback address, it is also the proxies, so anything you send to the proxy with 127.0.0.1 as destination will be delivered to the proxy server itself.
    – Frank Thomas
    Sep 26 '16 at 2:46












  • Local requests are actually fine. What I really need is our remote services (such as databases, search indexes etc) always see a static IP. So when I launch these web apps they should be accessing our remote SQL server etc through the proxy.
    – Adrian
    Sep 26 '16 at 3:27












  • it will work if you use any other IP or DNS name if (and only if) the IP and a DNS server hosting the name are accessible to it. the problem you are having is specific to loopback addresses like those in the 127.X.Y.Z range. Any other address will proxy fine as long as the name can be looked up and/or the ip is reachable. are the proxy, DB and web services on the LAN?
    – Frank Thomas
    Sep 26 '16 at 3:41










  • Nope, they are completely remote. The proxy is from blazingseollc.com/proxy while our databases etc are all hosted on AWS. I'm thinking I may have to purchase a cheap machine to run linux and my own proxy from my home. I'm just not 100% confident that would be stable enough if I am moving from country to country.
    – Adrian
    Sep 26 '16 at 3:53












  • in that case am I missing the place where you configure the remote IP of the remote services? as long as you point to the remote servers instead of localhost, and they don't initiate connections to your application, everything should work fine. I'm not understanding why you have configured your host-file in that manner or why you are trying to access remote addresses via your localhost/loopback address.
    – Frank Thomas
    Sep 26 '16 at 4:09
















  • 1




    absolutely impossible. the only way that will work is if you give up using localhost, and use the external IP address of the machine (and it must be an IP that is visible to the proxy, so if the proxy is on the internet, you will have to port forward to let the traffic back in). Much better to use a proxy switch addon for your browser so you can enable/disable proxying at will. 127.0.0.1 isn't just your loopback address, it is also the proxies, so anything you send to the proxy with 127.0.0.1 as destination will be delivered to the proxy server itself.
    – Frank Thomas
    Sep 26 '16 at 2:46












  • Local requests are actually fine. What I really need is our remote services (such as databases, search indexes etc) always see a static IP. So when I launch these web apps they should be accessing our remote SQL server etc through the proxy.
    – Adrian
    Sep 26 '16 at 3:27












  • it will work if you use any other IP or DNS name if (and only if) the IP and a DNS server hosting the name are accessible to it. the problem you are having is specific to loopback addresses like those in the 127.X.Y.Z range. Any other address will proxy fine as long as the name can be looked up and/or the ip is reachable. are the proxy, DB and web services on the LAN?
    – Frank Thomas
    Sep 26 '16 at 3:41










  • Nope, they are completely remote. The proxy is from blazingseollc.com/proxy while our databases etc are all hosted on AWS. I'm thinking I may have to purchase a cheap machine to run linux and my own proxy from my home. I'm just not 100% confident that would be stable enough if I am moving from country to country.
    – Adrian
    Sep 26 '16 at 3:53












  • in that case am I missing the place where you configure the remote IP of the remote services? as long as you point to the remote servers instead of localhost, and they don't initiate connections to your application, everything should work fine. I'm not understanding why you have configured your host-file in that manner or why you are trying to access remote addresses via your localhost/loopback address.
    – Frank Thomas
    Sep 26 '16 at 4:09










1




1




absolutely impossible. the only way that will work is if you give up using localhost, and use the external IP address of the machine (and it must be an IP that is visible to the proxy, so if the proxy is on the internet, you will have to port forward to let the traffic back in). Much better to use a proxy switch addon for your browser so you can enable/disable proxying at will. 127.0.0.1 isn't just your loopback address, it is also the proxies, so anything you send to the proxy with 127.0.0.1 as destination will be delivered to the proxy server itself.
– Frank Thomas
Sep 26 '16 at 2:46






absolutely impossible. the only way that will work is if you give up using localhost, and use the external IP address of the machine (and it must be an IP that is visible to the proxy, so if the proxy is on the internet, you will have to port forward to let the traffic back in). Much better to use a proxy switch addon for your browser so you can enable/disable proxying at will. 127.0.0.1 isn't just your loopback address, it is also the proxies, so anything you send to the proxy with 127.0.0.1 as destination will be delivered to the proxy server itself.
– Frank Thomas
Sep 26 '16 at 2:46














Local requests are actually fine. What I really need is our remote services (such as databases, search indexes etc) always see a static IP. So when I launch these web apps they should be accessing our remote SQL server etc through the proxy.
– Adrian
Sep 26 '16 at 3:27






Local requests are actually fine. What I really need is our remote services (such as databases, search indexes etc) always see a static IP. So when I launch these web apps they should be accessing our remote SQL server etc through the proxy.
– Adrian
Sep 26 '16 at 3:27














it will work if you use any other IP or DNS name if (and only if) the IP and a DNS server hosting the name are accessible to it. the problem you are having is specific to loopback addresses like those in the 127.X.Y.Z range. Any other address will proxy fine as long as the name can be looked up and/or the ip is reachable. are the proxy, DB and web services on the LAN?
– Frank Thomas
Sep 26 '16 at 3:41




it will work if you use any other IP or DNS name if (and only if) the IP and a DNS server hosting the name are accessible to it. the problem you are having is specific to loopback addresses like those in the 127.X.Y.Z range. Any other address will proxy fine as long as the name can be looked up and/or the ip is reachable. are the proxy, DB and web services on the LAN?
– Frank Thomas
Sep 26 '16 at 3:41












Nope, they are completely remote. The proxy is from blazingseollc.com/proxy while our databases etc are all hosted on AWS. I'm thinking I may have to purchase a cheap machine to run linux and my own proxy from my home. I'm just not 100% confident that would be stable enough if I am moving from country to country.
– Adrian
Sep 26 '16 at 3:53






Nope, they are completely remote. The proxy is from blazingseollc.com/proxy while our databases etc are all hosted on AWS. I'm thinking I may have to purchase a cheap machine to run linux and my own proxy from my home. I'm just not 100% confident that would be stable enough if I am moving from country to country.
– Adrian
Sep 26 '16 at 3:53














in that case am I missing the place where you configure the remote IP of the remote services? as long as you point to the remote servers instead of localhost, and they don't initiate connections to your application, everything should work fine. I'm not understanding why you have configured your host-file in that manner or why you are trying to access remote addresses via your localhost/loopback address.
– Frank Thomas
Sep 26 '16 at 4:09






in that case am I missing the place where you configure the remote IP of the remote services? as long as you point to the remote servers instead of localhost, and they don't initiate connections to your application, everything should work fine. I'm not understanding why you have configured your host-file in that manner or why you are trying to access remote addresses via your localhost/loopback address.
– Frank Thomas
Sep 26 '16 at 4:09












1 Answer
1






active

oldest

votes

















up vote
0
down vote













"Bypass proxy for local addresses" should work just fine. After all, it only takes effect when connecting to local addresses – ones that the proxy couldn't possibly reach anyway.



Also look under the "Advanced" tab for an exclusion list. You could list all your custom whatever.localhost domains in there.






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1128271%2faccessing-localhost-through-a-proxy%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    "Bypass proxy for local addresses" should work just fine. After all, it only takes effect when connecting to local addresses – ones that the proxy couldn't possibly reach anyway.



    Also look under the "Advanced" tab for an exclusion list. You could list all your custom whatever.localhost domains in there.






    share|improve this answer

























      up vote
      0
      down vote













      "Bypass proxy for local addresses" should work just fine. After all, it only takes effect when connecting to local addresses – ones that the proxy couldn't possibly reach anyway.



      Also look under the "Advanced" tab for an exclusion list. You could list all your custom whatever.localhost domains in there.






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        "Bypass proxy for local addresses" should work just fine. After all, it only takes effect when connecting to local addresses – ones that the proxy couldn't possibly reach anyway.



        Also look under the "Advanced" tab for an exclusion list. You could list all your custom whatever.localhost domains in there.






        share|improve this answer












        "Bypass proxy for local addresses" should work just fine. After all, it only takes effect when connecting to local addresses – ones that the proxy couldn't possibly reach anyway.



        Also look under the "Advanced" tab for an exclusion list. You could list all your custom whatever.localhost domains in there.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Sep 26 '16 at 4:52









        grawity

        228k35481540




        228k35481540






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1128271%2faccessing-localhost-through-a-proxy%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Probability when a professor distributes a quiz and homework assignment to a class of n students.

            Aardman Animations

            Are they similar matrix