-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: parse /etc/hosts for tcpsock:connect() #10
Conversation
9df3bd9
to
353d0e9
Compare
@@ -233,7 +248,7 @@ $main_include_directives | |||
http { | |||
access_log off; | |||
lua_socket_log_errors off; | |||
resolver @nameservers; | |||
resolver @nameservers ipv6=off; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might be undesired but necessary for the www.google.com
resolution test. Let me know if inappropriate.
Interesting, the new test is working locally but not on travis. It seems the parsing regex is overlooking aliases, totally overlooked that, my bad. |
@thibaultcha Yeah, this is too bloody. Will you instead add |
@thibaultcha Yeah, I welcome an nginx core patch for this. We can include it in OpenResty by default. |
353d0e9
to
7bd38f3
Compare
Updated the patch for the sake of it. Will take a look at the nginx core patch! |
@thibaultcha There is no IPv6 support on Travis CI's cloud. Not even |
@thibaultcha Awesome. Thanks! |
@agentzh I started such a patch. Might take a while since so many things are going on on our side these days, plus the Nginx core code base is new to me. Will get there tho, eventually! |
@agentzh I have such a patch ready on my side (finally got some time to finish it). However, I am not sure if it would be welcomed by Nginx. Do you happen to know if so? I know this is a long shot but maybe I am not aware if such a topic came up there already :) |
Hi there,
Not sure if this will be welcomed, but I basically thought of a quick hack to parse
/etc/hosts
and override tcpsock:connect and thought that'd be handy. A particular use-case for this is when implementing a resty-cli script that connects to a local service binded tolocalhost
.I understand if this is too hacky.