title: Connect to Flask localhost server through proxy IP
body: <p>I am new to Flask and web development and stuck trying to access the localhost development server through my browser, which is running through a proxy IP.</p>
  
  <p>The proxy IP I have set manually from the Google Chrome advanced settings (see <a href="https://customers.trustedproxies.com/knowledgebase.php?action=displayarticle&amp;id=10" rel="nofollow noreferrer">https://customers.trustedproxies.com/knowledgebase.php?action=displayarticle&amp;id=10</a>). "Bypass proxy for local addresses" is unchecked, as I do not want to do this here - the Flask server needs to use the proxy. For general browsing, setting the proxy is fine. Also, I am using socketio to run the app.</p>
  
  <p>With the proxy set in this way, I have tried these options without success:</p>
  
  <pre><code>socketio.run(app) # url http://127.0.0.1:5000/ or localhost:5000
  
  socketio.run(app, host='0.0.0.0', port=8080) # url http://127.0.0.1:8080/ or localhost:8080
  
  socketio.run(app, host='0.0.0.0') # url http://0.0.0.0:5000/ or localhost:5000
  
  socketio.run(app, host='0.0.0.0', port=8080) # url http://0.0.0.0:8080/ or localhost:8080
  
  socketio.run(app, host=proxyip) # url http://proxyip:5000/ or localhost:5000
  </code></pre>
  
  <p>I either get an "invalid address" error in the Python console, or a 502 error in my browser. Are there any other ways I can run the development server that may work here?</p>