mirror of
https://github.com/rofl0r/proxychains-ng
synced 2025-01-10 07:32:55 +08:00
Move string tables into common.c
This commit is contained in:
parent
bf5576c34f
commit
a9a221e51a
20
src/common.c
20
src/common.c
@ -3,6 +3,26 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
const char *proxy_type_strmap[] = {
|
||||||
|
"http",
|
||||||
|
"socks4",
|
||||||
|
"socks5",
|
||||||
|
};
|
||||||
|
|
||||||
|
const char *chain_type_strmap[] = {
|
||||||
|
"dynamic_chain",
|
||||||
|
"strict_chain",
|
||||||
|
"random_chain",
|
||||||
|
"round_robin_chain",
|
||||||
|
};
|
||||||
|
|
||||||
|
const char *proxy_state_strmap[] = {
|
||||||
|
"play",
|
||||||
|
"down",
|
||||||
|
"blocked",
|
||||||
|
"busy",
|
||||||
|
};
|
||||||
|
|
||||||
// stolen from libulz (C) rofl0r
|
// stolen from libulz (C) rofl0r
|
||||||
void pc_stringfromipv4(unsigned char *ip_buf_4_bytes, char *outbuf_16_bytes) {
|
void pc_stringfromipv4(unsigned char *ip_buf_4_bytes, char *outbuf_16_bytes) {
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
|
@ -11,6 +11,10 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
extern const char *proxy_type_strmap[];
|
||||||
|
extern const char *chain_type_strmap[];
|
||||||
|
extern const char *proxy_state_strmap[];
|
||||||
|
|
||||||
char *get_config_path(char* default_path, char* pbuf, size_t bufsize);
|
char *get_config_path(char* default_path, char* pbuf, size_t bufsize);
|
||||||
void pc_stringfromipv4(unsigned char *ip_buf_4_bytes, char *outbuf_16_bytes);
|
void pc_stringfromipv4(unsigned char *ip_buf_4_bytes, char *outbuf_16_bytes);
|
||||||
|
|
||||||
|
20
src/debug.c
20
src/debug.c
@ -4,26 +4,6 @@
|
|||||||
# include "common.h"
|
# include "common.h"
|
||||||
# include "debug.h"
|
# include "debug.h"
|
||||||
|
|
||||||
const char *proxy_type_strmap[] = {
|
|
||||||
"http",
|
|
||||||
"socks4",
|
|
||||||
"socks5",
|
|
||||||
};
|
|
||||||
|
|
||||||
const char *chain_type_strmap[] = {
|
|
||||||
"dynamic_chain",
|
|
||||||
"strict_chain",
|
|
||||||
"random_chain",
|
|
||||||
"round_robin_chain",
|
|
||||||
};
|
|
||||||
|
|
||||||
const char *proxy_state_strmap[] = {
|
|
||||||
"play",
|
|
||||||
"down",
|
|
||||||
"blocked",
|
|
||||||
"busy",
|
|
||||||
};
|
|
||||||
|
|
||||||
void DUMP_PROXY_CHAIN(proxy_data *pchain, unsigned int count) {
|
void DUMP_PROXY_CHAIN(proxy_data *pchain, unsigned int count) {
|
||||||
char ip_buf[16];
|
char ip_buf[16];
|
||||||
for (; count; pchain++, count--) {
|
for (; count; pchain++, count--) {
|
||||||
|
Loading…
Reference in New Issue
Block a user