{"id":20993173,"url":"https://github.com/water-melon/portal","last_synced_at":"2026-02-07T00:03:08.078Z","repository":{"id":83736056,"uuid":"107872481","full_name":"Water-Melon/Portal","owner":"Water-Melon","description":"Portal is a TCP tunnel written in C working on Linux. It does not only support web but also MySQL and anything running on TCP.","archived":false,"fork":false,"pushed_at":"2024-11-11T15:09:31.000Z","size":77,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-14T20:43:17.259Z","etag":null,"topics":["broadcast","c","event-driven","multiprocess","network","proxy","tcp","tunnel"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Water-Melon.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}},"created_at":"2017-10-22T14:20:05.000Z","updated_at":"2024-11-11T15:09:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5f93a2d-d836-4051-afa6-406299c8f6d9","html_url":"https://github.com/Water-Melon/Portal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Water-Melon/Portal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Water-Melon%2FPortal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Water-Melon%2FPortal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Water-Melon%2FPortal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Water-Melon%2FPortal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Water-Melon","download_url":"https://codeload.github.com/Water-Melon/Portal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Water-Melon%2FPortal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29181265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T23:15:33.022Z","status":"ssl_error","status_checked_at":"2026-02-06T23:15:09.128Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["broadcast","c","event-driven","multiprocess","network","proxy","tcp","tunnel"],"created_at":"2024-11-19T07:13:56.572Z","updated_at":"2026-02-07T00:03:08.042Z","avatar_url":"https://github.com/Water-Melon.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Guide\n\nPortal is a TCP Tunnel. It only support IPv4 now.\n\nIt helps that a service on Internet to fetch sets of data from an Intranet service. This is its common usage case. Besides that, it can help to build up a tunnel across many servers (whether or not on Internet) for decreasing network delay.\n\n* Environment\n* Install\n* Configure\n* Run\n\n## Environment\n\nPortal is tested on Ubuntu 16.04 x86_64. It is written in C, so we need a C compiler (most Linux distribution already installed).\n\nPortal only can working on Linux now, so you may need a Linux server to install it.\n\n## Install\n\nInstallation is very easy, just one command.\n\n```\nsudo make\n```\n\nIt will get the newest version of Melon and compile it and Portal.\n\nThe target execute file will be built in current directory (portal/).\n\n## Configure\n\n### Where is configuration file\n\nThere are five configuration files under directory `confs`.\n\n### Configuration format\n\nPortal is built up based on Melon (Melon is a framework library written in C), so its configuration file will derived from Melon's.\n\n```\n/*\n * log level, it has 5 levels, from lowest priority to highest, they are,\n * none, report, debug, warn and error.\n * This configuration Item means that logger records that messages those only higher or\n * equal to level 'none'.\n */\nlog_level \"none\";\n/*\n * Process's uid in runtime.\n */\nuser \"root\";\ndaemon off;\n/*\n * core file size if it generated unfortunately :-(.\n */\ncore_file_size \"unlimited\";\n/*\n * The maximum of opened file descriptors.\n */\nmax_nofile 1024;\n/*\n * Number of worker process.\n */\nworker_proc 1;/*must be 1*/\nthread_mode off; /*ignore this*/\nframework on;/*ignore this*/\n/*\n * Log file path.\n * You can modify this path and reload process in runtime.\n * For more detail, please see Melon's developer guide.\n */\nlog_path \"/usr/local/melon/logs/melon.log\";\n\n...(ignore some useless items)\n\n/*\n * All portal's configurations.\n */\nportal {\n    certify_token \"abcdfg\"; /*rc4 secret key, client's and server's must be identical.*/\n    tunnel_number 100; /*only used on Tunnel client*/\n    outerAddr \"127.0.0.1:9999\"; /*the address for accessing all other service*/\n    innerAddr \"0.0.0.0:1234\";/*the address for accessing client or server*/\n    role \"server\";/* \"server\" or \"client\" */\n    /*\n     * timeout:\n     * -1 means never timeout.\n     * \u003c -1 will raise a fault while starting up.\n     */\n    inner_timeout 3000;/*ms -- ping timeout in Tunnel, connection timeour in Proxy.*/\n    outer_timeout 3000;/*ms -- connection timeout (not used on Tunnel client)*/\n    retry_timeout 3000;/*ms -- re-connect timeout (only used on Tunnel client)*/\n    /*\n     * mode only used on Tunnel.\n     * There are two cases.\n     * 1. A client connects to the server and it will send TCP data at first.\n     * 2. A client connects to the server and wait for receiving data from server.\n     * 1 -- positive.\n     * 2 -- negative.\n     * For mysql, it should be set negative.\n     * This configuration item only works on client.\n     */\n    mode \"positive\";/* \"positive\" or \"negative\" */\n    as \"proxy\";/*proxy, tunnel or broadcaster\n                 indicates Portal will be used as a proxy, tunnel or broadcaster*/\n}\n```\n\n## Run\n\nThere are five modes of Portal manipulated by configuration file.\n\n- tunnel server\n\n- tunnel client\n\n- proxy server\n\n- proxy client\n\n- broadcaster\n\nYou can find these configuration templates in directory `confs`.\n\nIf we execute\n\n```\n./portal\n```\n\nProgram will try to look for the configuration file in Melon's (core framework) installation directory.\n\nSo, we can designate the configuration file path through the `-c` parameter.\n\n```\n./portal -c /.../path/to/conf\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwater-melon%2Fportal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwater-melon%2Fportal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwater-melon%2Fportal/lists"}