web2py behind socks proxy

43 views
Skip to first unread message

Saifuddin Rangwala

unread,
Aug 26, 2016, 9:15:46 AM8/26/16
to web2py-users
Hi,

    In my environment, I have web2py running inside restricted network that doesn't have direct internet access.

I have a socks proxy that can help with access to internet from web2py host.

Is there a way to configure a global socks proxy for web2py, such that everything like emails, catpcha etc.. will use that socks proxy?

I tried searching and found a few threads where people tried attempting the same in the past but it is very clear what was the solution.

Thanks and appreciate the help!

Saifuddin Rangwala

unread,
Aug 26, 2016, 9:19:36 AM8/26/16
to web2py-users
I meant to say: I tried searching and found a few threads where people tried attempting the same in the past but it is "not" very clear what was the solution.

Apology for spam.

Massimo Di Pierro

unread,
Aug 28, 2016, 8:56:43 PM8/28/16
to web2py-users
Not sure I understand what you mean. Do you want emails to go out using a different network interface than the incoming http connections? 

Saifuddin Rangwala

unread,
Aug 31, 2016, 1:53:14 AM8/31/16
to web...@googlegroups.com
So here is my deployment scenario for web2py:

web2py is running on AWS.

I have a 4 node setup on AWS: 1 load balancer, 2 webpy behind nginx with uwsgi and 1 postgres database.  nginx is behind the load balancer.

All outgress traffic(except local network) from web2py and database nodes has been blocked. Which means web2py cannot directly connect to a mail server that is running outside of this local network. And in this case mail server is a third party and running outside local network.

There is a separate proxy that is setup and all internet traffic(in this case: captcha and outgoing mails) needs to go via this proxy so that the traffic can be controlled better and audited as well.

I have set the http_proxy and https_proxy env variables for uwsgi processes and it has helped resolve the captcha issues. i.e. now all the google catpcha validation is going this proxy.

Now I understand that this is too much of an overkill for a web2py kind of application, but it has to be done this way due to some policy.

Hope this clarifies it a bit.



--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Saifuddin,
---------------------------------------------
Reach me @ +91 9850815274
---------------------------------------------

"The secret to find something is knowing where it is"
Reply all
Reply to author
Forward
0 new messages