{"id":18217448,"url":"https://github.com/nabeken/mikoi","last_synced_at":"2025-08-03T20:36:35.531Z","repository":{"id":33679615,"uuid":"37332364","full_name":"nabeken/mikoi","owner":"nabeken","description":"mikoi is a HAProxy's proxy protocol enabler for command line tools.","archived":false,"fork":false,"pushed_at":"2022-10-30T07:08:56.000Z","size":28,"stargazers_count":12,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-17T16:21:11.372Z","etag":null,"topics":["go","haproxy","haproxy-proxy-protocol","monitoring-plugins","proxies","proxyprotocol"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nabeken.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}},"created_at":"2015-06-12T16:26:02.000Z","updated_at":"2023-06-13T19:20:22.000Z","dependencies_parsed_at":"2022-09-13T09:12:47.163Z","dependency_job_id":null,"html_url":"https://github.com/nabeken/mikoi","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabeken%2Fmikoi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabeken%2Fmikoi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabeken%2Fmikoi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabeken%2Fmikoi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nabeken","download_url":"https://codeload.github.com/nabeken/mikoi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246895679,"owners_count":20851310,"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":["go","haproxy","haproxy-proxy-protocol","monitoring-plugins","proxies","proxyprotocol"],"created_at":"2024-11-03T17:05:26.501Z","updated_at":"2025-04-02T21:31:02.586Z","avatar_url":"https://github.com/nabeken.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mikoi\n\n[![Go](https://github.com/nabeken/mikoi/actions/workflows/go.yml/badge.svg)](https://github.com/nabeken/mikoi/actions/workflows/go.yml)\n\nmikoi is a [HAProxy's proxy protocol](http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt) enabler for command line tools.\n\nIt is designed to work to monitor ProxyProtocol enabled server with usual monitoring plugins such as nagios-plugins and sensu-plugins.\n\nIn normal situation, existing monitoring plugins can not monitor ProxyProtocol enabled server without modifications.\n\nmikoi launches a proxy server lisening to an [ephemeral port](http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html) (dynamically allocated port) and forks a plugin with passing the port number to let the pluging connect to that port.\n\nmikoi adds a ProxyProtocol header to traffic comes from a plugin and proxies to real server.\n\n```text\n        +----------+\n  +---\u003e |  plugin  | forked by mikoi\n  |     +----------+\n  |       /|\\   |\n  |        |    |\n  |        |   \\|/\n  |      +---------+            +----------+\n  |      |         | \u003c--------- |          |\n  +----- |  mikoi  |            |  server  | (proxy protocol enabled)\n         |         | ---------\u003e |          |\n         +---------+ w/ header  +----------+\n```\n\n## Installation\n\nDownload from [releases](https://github.com/nabeken/mikoi/releases).\n\nOr\n\n```sh\ngo get -u github.com/nabeken/mikoi\n```\n\n## Usage\n\n```sh\n$ mikoi -h\nUsage:\n  mikoi [OPTIONS]\n\nApplication Options:\n  -H, --hostname=       host name\n  -p, --port=           port number\n  -t, --timeout=        connection times out (default: 10s)\n  -V, --verbose         verbose\n  -P, --proxyproto      use ProxyProto\n      --proxyproto-src= Source address for ProxyProto\n\nHelp Options:\n  -h, --help            Show this help message\n```\n\n```sh\n$ mikoi \\\n  -P \\\n  -H smtp.example.com \\\n  -p 25 \\\n  -- /usr/lib/nagios/plugins/check_smtp -H 127.0.0.1 -p {} -w 0.5 -c 1.0\n```\n\n`{}` will be replaced with an ephemeral port that mikoi is listening to.\n\nIf you omit command line arguments for plugin, mikoi runs in proxy server mode:\n\n```sh\n$ mikoi -V -H smtp.example.com -p 25 -P\ncmd args: []\nmikoi is now running as proxy server mode\nmikoi is now listening to 63568\nmikoi is launching server\n\n// You can connect to 63568 by any clients\n$ telnet 127.0.0.1 63568\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnabeken%2Fmikoi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnabeken%2Fmikoi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnabeken%2Fmikoi/lists"}