1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
============================================================================
Name : hev-main.h
Author : hev <r@hev.cc>
Copyright : Copyright (c) 2019 - 2023 hev
Description : Main
============================================================================
*/
#ifndef __HEV_MAIN_H__
#define __HEV_MAIN_H__
#ifdef __cplusplus
extern "C" {
#endif
/**
* hev_socks5_tunnel_main:
* @config_path: config file path
* @tun_fd: tunnel file descriptor
*
* Start and run the socks5 tunnel, this function will blocks until the
* hev_socks5_tunnel_quit is called or an error occurs.
*
* Returns: returns zero on successful, otherwise returns -1.
*
* Since: 2.4.6
*/
int hev_socks5_tunnel_main (const char *config_path, int tun_fd);
/**
* hev_socks5_tunnel_quit:
*
* Stop the socks5 tunnel.
*
* Since: 2.4.6
*/
void hev_socks5_tunnel_quit (void);
#ifdef __cplusplus
}
#endif
#endif /* __HEV_MAIN_H__ */