Qt4: Webkit Netzwerkproxy

Alles rund um die Programmierung mit Qt
Antworten
nando
Beiträge: 321
Registriert: 28. Oktober 2004 13:16

Qt4: Webkit Netzwerkproxy

Beitrag von nando »

Hi,

kann man webkit mit einem proxy nutzen um z.b aus einem firmennetzwerk raus zu arbeiten. (mit und ohne passwort authentifikation beim proxyserver) ?

gruss,
nando
ElwoodJ
Beiträge: 50
Registriert: 5. August 2005 09:33
Wohnort: /home/elwood

Beitrag von ElwoodJ »

Hallo,
Ich denke das geht über den ApplicationProxy. Allerdings bekomme ich das hier in der Firma nicht sauber hin, obwohl hier nur ein http-Proxy über Port 80 davor ist.

Code: Alles auswählen

QNetworkProxy QNetworkProxy::applicationProxy ()   [static]
Bzw.:

Code: Alles auswählen

void QNetworkProxy::setApplicationProxy ( const QNetworkProxy & networkProxy )   [static]
Gruß

Elwood
nando
Beiträge: 321
Registriert: 28. Oktober 2004 13:16

Beitrag von nando »

moin,

also das ist auch mein problem.
ich habe es mit QApplicationProxy probiert... Aber es geht nicht...

Weder mit DefaultProxy noch mit Socks5Proxy :(

Wenn ich QHTTP mache klappt es ....
aber ich brauche den proxy im webkit ...

also ist weiter forschen angesagt....


gruss,
nando
ElwoodJ
Beiträge: 50
Registriert: 5. August 2005 09:33
Wohnort: /home/elwood

Beitrag von ElwoodJ »

Einerseits schlecht, andererseits gut :)

Dann hab ich das Problem nicht allein. Wenn du was rausbekommst, lass es mich mal bitte wissen.

Thx

Elwood
nando
Beiträge: 321
Registriert: 28. Oktober 2004 13:16

Beitrag von nando »

Ja logo..
sobald ich mehr weiss geb ich natuerlich bescheid :)
ElwoodJ
Beiträge: 50
Registriert: 5. August 2005 09:33
Wohnort: /home/elwood

Beitrag von ElwoodJ »

Habe zu dem Thema noch das hier gefunden:

http://trolltech.com/developer/task-tra ... &id=208705
nando
Beiträge: 321
Registriert: 28. Oktober 2004 13:16

Beitrag von nando »

Hab ich ganz vergessen...sorry,
hier die antwort von den trolls...
> i need a way to use webkit threw a network proxy.
>
> i tried QNetworkProxy but it doesn't work for me... :-(
>
> If i use standard QHttp class and set the proxy it works..... but with
> QNetworkProxy in conjunction with webkit i can not get it running ;(
>
>
> Any ideas ?

This is possible to do, what you need to do is set it by getting the
QNetworkAccessManager from the QWebPage attached to your QWebView and
set the proxy on that one. I.e. something like

QNetworkProxy proxy;
// ...
QNetworkAccessManager* manager;
manager = webview->page()->networkAccessManager();
manager->setProxy(proxy);

The documentation for this class is at:

http://doc.trolltech.com/4.4/qnetworkaccessmanager.html

There is already a suggestion in our task tracker to implement a
setProxy() function which you can track at:

http://trolltech.com/developer/task-tra ... &id=208705
http://trolltech.com/customer/task-trac ... &id=208705

If you run into further problems then please let me know.

Regards,
Andy

Ich meine auch gesehen zu haben, dass die setPorxy Funktion im qt 4.5 snapshot drin war......
Aber so wie oben beschrieben geht es auch ;)

Gruss,
Nando
Antworten