byedpi/extend.h
ruti e02ce91363 auto-mode option (#127)
* trigger auto if connetion closes/resets after several packets

* send RST if remote connection is reset

* change cache value struct
2024-09-14 15:47:57 +03:00

33 lines
770 B
C

#ifndef EXTEND_H
#define EXTEND_H
#include <stddef.h>
#include "proxy.h"
int socket_mod(int fd, struct sockaddr *dst);
int connect_hook(struct poolhd *pool, struct eval *val,
struct sockaddr_ina *dst, int next);
int on_tunnel_check(struct poolhd *pool, struct eval *val,
char *buffer, size_t bfsize, int out);
int on_desync(struct poolhd *pool, struct eval *val,
char *buffer, size_t bfsize, int out);
ssize_t udp_hook(struct eval *val,
char *buffer, size_t bfsize, ssize_t n, struct sockaddr_ina *dst);
int on_torst(struct poolhd *pool, struct eval *val);
int on_fin(struct poolhd *pool, struct eval *val);
#ifdef __linux__
int protect(int conn_fd, const char *path);
#else
#define protect(fd, path) 0
#endif
#endif