{"id":27734288,"url":"https://github.com/chxuan/switch-proxy","last_synced_at":"2025-04-28T13:05:23.505Z","repository":{"id":77439772,"uuid":"251303307","full_name":"chxuan/switch-proxy","owner":"chxuan","description":"switch-proxy是采用C++开发基于Boost.Asio的网络转发代理服务","archived":false,"fork":false,"pushed_at":"2020-04-07T08:49:33.000Z","size":47,"stargazers_count":7,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-28T13:03:16.740Z","etag":null,"topics":["asio","boost","cpp","tcp","udp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chxuan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-30T12:51:24.000Z","updated_at":"2023-11-17T00:56:31.000Z","dependencies_parsed_at":"2023-03-02T04:00:40.579Z","dependency_job_id":null,"html_url":"https://github.com/chxuan/switch-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chxuan%2Fswitch-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chxuan%2Fswitch-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chxuan%2Fswitch-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chxuan%2Fswitch-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chxuan","download_url":"https://codeload.github.com/chxuan/switch-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251319608,"owners_count":21570426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asio","boost","cpp","tcp","udp"],"created_at":"2025-04-28T13:03:07.560Z","updated_at":"2025-04-28T13:05:23.498Z","avatar_url":"https://github.com/chxuan.png","language":"C++","readme":"## switch-proxy\n\n\u003e switch-proxy是采用C++开发基于Boost.Asio的网络转发代理服务。\n\n## 编译\n\n### 添加boost依赖环境变量\n\n编辑`~/.bashrc`，添加如下内容\n```\nexport BOOST_INCLUDE_PATH=\"your/boost/include/path\"\nexport BOOST_LIB_PATH=\"your/boost/lib/path\"\n\n```\n然后执行`source ~/.bashrc`让配置生效\n\n### 编译switch-proxy\n\n    cd ./switch-proxy/build\n    cmake ..\n    make\n\n## 运行\n\n    ./switch_proxy_server ./switch_proxy.conf\n\n控制台或日志显示如下信息则表示服务启动成功\n\n    I2020-04-07 01:41:28.710 tcp_switch_session_manager.cpp:17] TCP转发代理启动成功,正在监听:[0.0.0.0:8888]\n\n## 配置文件\n\n```\n#服务监听地址\nlisten_ip=0.0.0.0\nlisten_port=8888\n\n#io线程数量\nio_threads=4\n\n#日志级别[all = 0, trace, debug, info, warn, error, fatal]\nlog_level=0\n\n#日志路径\nlog_path=./log\n\n#日志文件大小[100*1024*1024=104857600=100MB]\nlog_file_size=104857600\n\n#协议类型[tcp或udp]\ntype=tcp\n\n#转发的目标服务地址,编号[0~99]\ntarget_ip0=127.0.0.1\ntarget_port0=9999\n\ntarget_ip1=127.0.0.1\ntarget_port1=10000\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchxuan%2Fswitch-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchxuan%2Fswitch-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchxuan%2Fswitch-proxy/lists"}