I want to get webpage source code, but YouTube is blocked in my country, so I asked it to host a proxy server: 127.0.
Is a good option for me, but I do not know how to add this function to my proxy server, I have a lot
Only showing me how to use this function is enough, I know how to get webpage source code
/ P>
You need to create a subclass of QNetworkProxyFactory and do it again
queryProxy virtual method.
QList & lt; QNetworkProxy & gt; MyNetworkProxyFactory :: queryProxy (Const. QNetworkProxyQuery and Query) {QNetworkProxy Proxy; If (query.url). Host () == "www.youtube.com") {// modify 'proxy' variable according to your proxy} Return QList & lt; QNetworkProxy & gt; () & Lt; & Lt; Proxy; }
No comments:
Post a Comment