1 /* 2 * proxy-bio.h - BIO layer for transparent proxy connections 3 * 4 * Copyright (c) 2012 The Chromium Authors. All rights reserved. 5 * Use of this source code is governed by a BSD-style license that can be 6 * found in the LICENSE file. 7 */ 8 9 #ifndef PROXY_BIO_H 10 #define PROXY_BIO_H 11 12 #include <stdint.h> 13 14 #include <openssl/bio.h> 15 16 #include "util.h" 17 18 struct proxy_ctx { 19 char *host; 20 uint16_t port; 21 int connected; 22 int (*connect)(BIO *b); 23 }; 24 25 BIO *BIO_new_proxy(); 26 27 /* These do not take ownership of their string arguments. */ 28 int BIO_proxy_set_type (BIO *b, const char *type); 29 int BIO_proxy_set_host (BIO *b, const char *host); 30 void BIO_proxy_set_port (BIO *b, uint16_t port); 31 32 #endif /* !PROXY_BIO_H */ 33