wildcard paths in dnsmasq?

夙愿已清 提交于 2019-12-22 12:33:25

问题


Is it possible to set a wildcard * in a path pattern?

address=.example.com/foo/*/bar does not seem to work.

address=.example.com/foo/xxx/bar works but I have random characters I need to match for and I don't know what they are ahead of time.


回答1:


Not possible.

dnsmask is about the resolution of the host name only.

Everything after the slash is between the web browser (or client) and the web server, the name servers don't ever get to see this part.

It can get confusing, because dnsmasq uses '/' as its separator character in a lot of its settings, but this is nothing to do with the path part of a url, simply a chose of config file delimiter.

To achieve some fine grained manipulation of what parts of a web server you want your users to see, you should be googling "http proxies" or possibly "transparent http proxies" and this should get you started. These provide an intermediate server that does get to see the "path" part of the URL, and con do this level of filtering.



来源:https://stackoverflow.com/questions/43012355/wildcard-paths-in-dnsmasq

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!