2024-08-07 11:25:26 +00:00
|
|
|
#ifndef EXTEND_H
|
|
|
|
#define EXTEND_H
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
#include "proxy.h"
|
|
|
|
|
2024-08-14 12:20:35 +00:00
|
|
|
int socket_mod(int fd, struct sockaddr *dst);
|
|
|
|
|
2024-04-23 05:47:27 +00:00
|
|
|
int connect_hook(struct poolhd *pool, struct eval *val,
|
|
|
|
struct sockaddr_ina *dst, int next);
|
|
|
|
|
2024-10-20 15:50:08 +00:00
|
|
|
ssize_t tcp_send_hook(struct eval *val,
|
|
|
|
char *buffer, size_t bfsize, ssize_t n);
|
|
|
|
|
|
|
|
ssize_t tcp_recv_hook(struct poolhd *pool, struct eval *val,
|
|
|
|
char *buffer, size_t bfsize);
|
|
|
|
|
2024-07-29 09:26:42 +00:00
|
|
|
ssize_t udp_hook(struct eval *val,
|
|
|
|
char *buffer, size_t bfsize, ssize_t n, struct sockaddr_ina *dst);
|
|
|
|
|
2024-10-20 15:50:08 +00:00
|
|
|
int on_first_tunnel(struct poolhd *pool,
|
|
|
|
struct eval *val, char *buffer, ssize_t bfsize, int etype);
|
|
|
|
|
2024-04-27 23:50:46 +00:00
|
|
|
#ifdef __linux__
|
|
|
|
int protect(int conn_fd, const char *path);
|
|
|
|
#else
|
|
|
|
#define protect(fd, path) 0
|
2024-08-07 11:25:26 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|