diff options
| author | frosty <gabriel@bwaaa.monster> | 2026-02-27 18:32:23 -0500 |
|---|---|---|
| committer | frosty <gabriel@bwaaa.monster> | 2026-02-27 18:32:23 -0500 |
| commit | 9f2cd561286784fd000eb8a00f1f80db3185062c (patch) | |
| tree | 14216b6d50b34bab1c7f7ae70d628d3560613f9e /src/Proxy/Proxy.h | |
| parent | 26e3403e039d1a80f2e62f8efe889ad5f40c8cee (diff) | |
| download | omnisearch-9f2cd561286784fd000eb8a00f1f80db3185062c.tar.gz | |
added proxying
Diffstat (limited to 'src/Proxy/Proxy.h')
| -rw-r--r-- | src/Proxy/Proxy.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/Proxy/Proxy.h b/src/Proxy/Proxy.h new file mode 100644 index 0000000..d9a438d --- /dev/null +++ b/src/Proxy/Proxy.h @@ -0,0 +1,31 @@ +#ifndef PROXY_H +#define PROXY_H + +#include <curl/curl.h> + +typedef enum { PROXY_HTTP, PROXY_SOCKS4, PROXY_SOCKS5 } ProxyType; + +typedef struct { + ProxyType type; + char host[256]; + int port; + char username[64]; + char password[64]; + int failures; +} Proxy; + +extern Proxy *proxy_list; +extern int proxy_count; +extern int max_proxy_retries; +extern int randomize_username; +extern int randomize_password; +extern char proxy_url[512]; + +int load_proxy_list(const char *filename); +void free_proxy_list(void); +Proxy *get_random_proxy(void); +void record_proxy_failure(Proxy *proxy); +void apply_proxy_settings(CURL *curl); +void set_proxy_config(const char *proxy_str, int rand_user, int rand_pass); + +#endif |
