代码拉取完成,页面将自动刷新
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <arpa/inet.h>
#define PROXY "127.0.0.1"
#define PROXY_PORT 9050
#define USERNAME "toraliz"// "toraliz\0"
#define reqsize sizeof(struct proxy_request)
#define ressize sizeof(struct proxy_response)
/*
system call or util function we need to use:
- socket()
- connect()
- close()
- htons()
- inet_addr()
*/
//--------------------------------------------------------
// sock4 rfc: https://www.openssh.com/txt/socks4.protocol
//--------------------------------------------------------
typedef unsigned char int8;
typedef unsigned short int int16;
typedef unsigned int int32;
struct proxy_request {
int8 vn;
int8 cd;
int16 dstport;
int32 dstip;
unsigned char userid[8];
};
typedef struct proxy_request Req;
struct proxy_response {
int8 vn;
int8 cd;
int16 _;// ignored
int32 __;// ignored
};
typedef struct proxy_response Res;
Req *request(const char *, const int);
int main(int, char **);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。