Skip to content

Commit

Permalink
Add examples socks5_proxy_server
Browse files Browse the repository at this point in the history
  • Loading branch information
ithewei committed Dec 24, 2021
1 parent 2b4d898 commit a0ffa88
Show file tree
Hide file tree
Showing 6 changed files with 415 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ examples: hmain_test htimer_test hloop_test \
tcp_proxy_server \
udp_echo_server \
udp_proxy_server \
socks5_proxy_server \
multi-acceptor-processes \
multi-acceptor-threads \
one-acceptor-multi-workers \
Expand Down Expand Up @@ -103,6 +104,9 @@ udp_echo_server: prepare
udp_proxy_server: prepare
$(MAKEF) TARGET=$@ SRCDIRS="$(CORE_SRCDIRS)" SRCS="examples/udp_proxy_server.c"

socks5_proxy_server: prepare
$(MAKEF) TARGET=$@ SRCDIRS="$(CORE_SRCDIRS)" SRCS="examples/socks5_proxy_server.c"

multi-acceptor-processes: prepare
$(MAKEF) TARGET=$@ SRCDIRS="$(CORE_SRCDIRS)" SRCS="examples/multi-thread/multi-acceptor-processes.c"

Expand Down
1 change: 1 addition & 0 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ int main() {
- TCP代理服务: [examples/tcp_proxy_server.c](examples/tcp_proxy_server.c)
- UDP回显服务: [examples/udp_echo_server.c](examples/udp_echo_server.c)
- UDP代理服务: [examples/udp_proxy_server.c](examples/udp_proxy_server.c)
- SOCKS5代理服务: [examples/socks5_proxy_server.c](examples/socks5_proxy_server.c)
- TinyHttpd示例:[examples/tinyhttpd.c](examples/tinyhttpd.c)
- TinyProxyd示例:[examples/tinyproxyd.c](examples/tinyproxyd.c)
- jsonRPC示例: [examples/jsonrpc](examples/jsonrpc)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ int main() {
- [examples/tcp_proxy_server.c](examples/tcp_proxy_server.c)
- [examples/udp_echo_server.c](examples/udp_echo_server.c)
- [examples/udp_proxy_server.c](examples/udp_proxy_server.c)
- [examples/socks5_proxy_server.c](examples/socks5_proxy_server.c)
- [examples/tinyhttpd.c](examples/tinyhttpd.c)
- [examples/tinyproxyd.c](examples/tinyproxyd.c)
- [examples/jsonrpc](examples/jsonrpc)
Expand Down
4 changes: 4 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ list(APPEND EXAMPLES
tcp_proxy_server
udp_echo_server
udp_proxy_server
socks5_proxy_server
jsonrpc_client
jsonrpc_server
)
Expand Down Expand Up @@ -45,6 +46,9 @@ target_link_libraries(udp_echo_server ${HV_LIBRARIES})
add_executable(udp_proxy_server udp_proxy_server.c)
target_link_libraries(udp_proxy_server ${HV_LIBRARIES})

add_executable(socks5_proxy_server socks5_proxy_server.c)
target_link_libraries(socks5_proxy_server ${HV_LIBRARIES})

add_executable(jsonrpc_client jsonrpc/jsonrpc_client.c jsonrpc/cJSON.c)
target_link_libraries(jsonrpc_client ${HV_LIBRARIES})

Expand Down
1 change: 1 addition & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
├── http_client_test.c HTTP客户端测试代码
├── http_server_test.c HTTP服务端测试代码
├── nc.c 网络连接工具
├── socks5_proxy_server.c SOCKS5代理服务
├── tcp_chat_server.c TCP聊天服务
├── tcp_echo_server.c TCP回显服务
├── tcp_proxy_server.c TCP代理服务
Expand Down
Loading

0 comments on commit a0ffa88

Please sign in to comment.