c614961364
* When using a proxy, HTTPS connexion must still go directly to the target website. The proxy can then act as a TCP stream relay and just transmit the raw SSL stream between the client and website. * For this, we ask the proxy sending an HTTP request with the CONNECT method. If the proxy supports this, we can then send anything as the payload and it will be forwarded. * Untested, as the network here in Dusseldorf doesn't let me use a proxy. ticket : #10973
33 lines
785 B
C++
33 lines
785 B
C++
/*
|
|
* Copyright 2015, Haiku, Inc. All Rights Reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _PROXY_SECURE_SOCKET_H
|
|
#define _PROXY_SECURE_SOCKET_H
|
|
|
|
|
|
#include <SecureSocket.h>
|
|
|
|
|
|
class BProxySecureSocket : public BSecureSocket {
|
|
public:
|
|
BProxySecureSocket(const BNetworkAddress& proxy);
|
|
BProxySecureSocket(const BNetworkAddress& proxy,
|
|
const BNetworkAddress& peer,
|
|
bigtime_t timeout = B_INFINITE_TIMEOUT);
|
|
BProxySecureSocket(const BProxySecureSocket& other);
|
|
virtual ~BProxySecureSocket();
|
|
|
|
// BSocket implementation
|
|
|
|
virtual status_t Connect(const BNetworkAddress& peer,
|
|
bigtime_t timeout = B_INFINITE_TIMEOUT);
|
|
|
|
private:
|
|
const BNetworkAddress fProxyAddress;
|
|
};
|
|
|
|
|
|
#endif // _PROXY_SECURE_SOCKET_H
|
|
|