{"id":13398970,"url":"https://github.com/sipcapture/heplify","last_synced_at":"2025-04-07T11:09:10.152Z","repository":{"id":38421921,"uuid":"98731734","full_name":"sipcapture/heplify","owner":"sipcapture","description":"Portable and Lightweight HEP Capture Agent for HOMER","archived":false,"fork":false,"pushed_at":"2024-04-19T12:41:01.000Z","size":1977,"stargazers_count":172,"open_issues_count":6,"forks_count":64,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-05-01T21:35:15.393Z","etag":null,"topics":["agent","arm","eep","hep","homer","linux","mips","rtcp","sip","sipcapture","windows"],"latest_commit_sha":null,"homepage":"https://sipcapture.org","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sipcapture.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["qxip"],"custom":["https://bunq.me/qxip"]}},"created_at":"2017-07-29T12:41:21.000Z","updated_at":"2024-06-28T18:20:26.707Z","dependencies_parsed_at":"2023-02-08T12:46:04.814Z","dependency_job_id":"a1ea2af1-59ef-46e6-9440-89890cfbea7e","html_url":"https://github.com/sipcapture/heplify","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sipcapture%2Fheplify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sipcapture%2Fheplify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sipcapture%2Fheplify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sipcapture%2Fheplify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sipcapture","download_url":"https://codeload.github.com/sipcapture/heplify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640465,"owners_count":20971557,"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":["agent","arm","eep","hep","homer","linux","mips","rtcp","sip","sipcapture","windows"],"created_at":"2024-07-30T19:00:33.071Z","updated_at":"2025-04-07T11:09:10.118Z","avatar_url":"https://github.com/sipcapture.png","language":"Go","funding_links":["https://github.com/sponsors/qxip","https://bunq.me/qxip","https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=donation%40sipcapture%2eorg\u0026lc=US\u0026item_name=SIPCAPTURE\u0026no_note=0\u0026currency_code=EUR\u0026bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest"],"categories":["Contribution Guidelines","Interconnect"],"sub_categories":["Stand-Alone Client Applications","SBC, IMS"],"readme":"\u003ca href=\"https://sipcapture.org\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/1423657/55069501-8348c400-5084-11e9-9931-fefe0f9874a7.png\" width=200/\u003e\u003c/a\u003e\n\n\u003cimg src=\"https://github.com/sipcapture/heplify/assets/1423657/7a36896d-0bd3-4cf3-9525-0513e67aee46\"\u003e\n\n\u003cimg src=\"https://img.shields.io/docker/pulls/sipcapture/heplify\"\u003e\n\nheplify is captagents little brother, optimized for speed and simplicity. It's a single binary which you can run\non Linux, ARM, MIPS, Windows to capture IPv4 or IPv6 packets and send them to Homer. Heplify is able to send\nSIP, correlated RTCP, RTCPXR, DNS, Logs into homer.\nIt's able to handle fragmented and duplicate packets out of the box.\n\n## Requirements\n\n### Linux\n\nNone if you use the binary from the releases\n\n### Windows\n\n[WinPcap](https://www.winpcap.org/install/default.htm)\n\n## Installation\n\n### Linux\n\nDownload [heplify](https://github.com/sipcapture/heplify/releases) and execute 'chmod +x heplify'\n\n### Windows\n\nDownload [heplify.exe](https://github.com/sipcapture/heplify/releases)\n\n### Development build\n\nIf you have Go 1.18+ installed, build the latest heplify binary by running `make`.\n\nNow you should install LUA Jit:\n\n* Compile from sources:  \n  \n  Install luajit dev libary\n  \n  `apt-get install libluajit-5.1-dev`\n  \n  or \n  \n  `yum install luajit-devel`\n\n  or for macOS\n\n  ```sh\n  # Assuming brew installs to /usr/local/\n  brew install lua@5.1 luajit\n  ln -s /usr/local/lib/pkgconfig/luajit.pc /usr/local/lib/pkgconfig/luajit-5.1.pc\n  export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/\n  ```\n  \n  [install](https://golang.org/doc/install) Go 1.11+\n\n  `go build cmd/heplify/heplify.go`\n  \n  \n\n### Docker\n\nYou can also build a docker image:\n\n```bash\ndocker build --no-cache -t sipcapture/heplify:latest -f docker/heplify/Dockerfile .\n```\n\nYou can use the image using docker compose: \n\n```\n  heplify:\n    image: sipcapture/heplify:latest\n    user: 1000:1000\n    cap_add:\n      - CAP_NET_ADMIN\n      - CAP_NET_RAW\n    command:\n      ./heplify -e -hs ${HOMER_DST}:9060 -m SIP -dd -zf -l info\n    network_mode: host\n    restart: unless-stopped\n```\n\n## Usage\n\n```bash\n -assembly_debug_log\n\tIf true, the github.com/google/gopacket/tcpassembly library will log verbose debugging information (at least one line per packet)\n  -assembly_memuse_log\n\tIf true, the github.com/google/gopacket/tcpassembly library will log information regarding its memory use every once in a while.\n  -b int\n\tInterface buffersize (MB) (default 32)\n  -bpf string\n        Custom BPF to capture packets\n  -collectonlysip\n        collect only sip\n  -d string\n\tEnable certain debug selectors [defrag,layer,payload,rtp,rtcp,sdp]\n  -dd\n\tDeduplicate packets\n  -di string\n\tDiscard uninteresting packets by any string\n  -didip string\n\tDiscard uninteresting SIP packets by Destination IP(s)\n  -diip string\n\tDiscard uninteresting SIP packets by Source or Destination IP(s)\n  -dim string\n\tDiscard uninteresting SIP packets by Method [OPTIONS,NOTIFY]\n  -disip string\n\tDiscard uninteresting SIP packets by Source IP(s)\n  -e\t\n\tLog to stderr and disable syslog/file output\n  -eof-exit\n        Exit once done reading pcap file\n  -erspan\n\terspan\n  -fg uint\n\tFanout group ID for af_packet\n  -fi string\n\tFilter interesting packets by any string\n  -fnum int\n        The total num of log files to keep (default 7)\n  -fsize uint\n        The rotate size per log file based on byte (default 10485760)\n  -fw int\n\tFanout worker count for af_packet (default 4)\n  -hep-buffer-activate\n        enable buffer messages if connection to HEP server broken\n  -hep-buffer-debug\n        enable debug buffer messages\n  -hep-buffer-file string\n        filename and location for hep-buffer file (default \"HEP-Buffer.dump\")\n  -hep-buffer-max-size string\n        max buffer size, can be B, KB, MB, GB, TB. By default - unlimited (default \"0\")\n  -hi uint\n\tHEP node ID (default 2002)\n  -hin\n\tHEP collector listening protocol, address and port (example: \"tcp:10.10.99.10:9060\")\n  -hn string\n\tHEP node Name\n  -hp string\n\tHEP node PW\n  -hs string\n\tHEP server destination address and port (default \"127.0.0.1:9060\")\n  -i string\n\tListen on interface (default \"any\")\n  -keepalive uint\n        keep alive internal - 5 seconds by default. 0 - disable (default 5)\n  -l string\n\tLog level [debug, info, warning, error] (default \"info\")\n  -lp int\n\tLoop count over ReadFile. Use 0 to loop forever (default 1)\n  -m string\n\tCapture modes [SIP, SIPDNS, SIPLOG, SIPRTCP] (default \"SIPRTCP\")\n  -n string\n\tLog filename (default \"heplify.log\")\n  -nt string\n\tNetwork types are [udp, tcp, tls] (default \"udp\")\n  -bpf string\n\tCustom bpf filter (default \"\")\n  -o\t\n\tRead packet for packet\n  -p string\n\tLog filepath (default \"./\")\n  -pr string\n\tPortrange to capture SIP (default \"5060-5090\")\n  -prometheus string\n        prometheus metrics - ip:port. By default all IPs (default \":8090\")\n  -protobuf\n\tUse Protobuf on wire\n  -rf string\n\tRead pcap file\n  -rs\n\tUse packet timestamps with maximum pcap read speed\n  -rt int\n\tPcap rotation time in minutes (default 60)\n  -s int\n\tSnaplength (default 8192)\n  -script-file string\n        Script file to execute on each packet\n  -script-hep-filter string\n        HEP filter for script, comma separated list of HEP types (default \"1\")\n  -sipassembly\n        If true, sipassembly will be enabled\n  -skipverify\n        skip certifcate validation\n  -sl\n\tLog to syslog\n  -t string\n\tCapture types are [pcap, af_packet] (default \"pcap\")\n  -tcpassembly\n\tIf true, tcpassembly will be enabled\n  -tcpsendretries uint\n\tNumber of retries for sending before giving up and reconnecting (default 64)\n  -version\n\tShow heplify version\n  -vlan\n\tvlan\n  -wf string\n\tPath to write pcap file\n  -zf\n\tEnable pcap compression\n  -script-file string\n    \tLUA script file path to execute on each packet\n  -script-hep-filter string\n    \tHEP Type filter for LUA script, comma separated list (default \"1\")\n\n```\n\n## Examples\n\n```bash\n# Capture SIP and RTCP packets on any interface and send them to 127.0.0.1:9060\n./heplify\n\n# Capture SIP and RTCP packets on any interface and send them via TLS to 192.168.1.1:9060\n./heplify -hs 192.168.1.1:9060 -nt tls\n\n# Capture SIP and RTCP packets on any interface and send them to 192.168.1.1:9060. Use a someNodeName\n./heplify -hs 192.168.1.1:9060 -hn someNodeName\n\n# Capture SIP and RTCP packets on any interface and send them to 192.168.1.1:9060. Print info to stdout\n./heplify -hs 192.168.1.1:9060 -e\n\n# Capture SIP and RTCP packets on any interface and send them to 192.168.1.1:9060 and 192.168.2.2:9060\n./heplify -hs \"192.168.1.1:9060,192.168.2.2:9060\"\n\n# Capture SIP and RTCP packets on any interface and send them to 192.168.1.1:9060. Print debug selectors\n./heplify -hs 192.168.1.1:9060 -e -d fragment,payload,rtcp\n\n# Capture SIP and RTCP packets with custom SIP port range on eth2 and send them to 192.168.1.1:9060\n./heplify -i eth2 -pr 6000-6010 -hs 192.168.1.1:9060\n\n# Capture SIP and RTCP packets on eth2, send them to homer and compressed to /srv/pcapdumps/\n./heplify -i eth2 -hs 192.168.1.1:9060 -wf /srv/pcapdumps/ -zf\n\n# Read example/rtp_rtcp_sip.pcap and send SIP and correlated RTCP packets to 192.168.1.1:9060\n./heplify -rf example/rtp_rtcp_sip.pcap -hs 192.168.1.1:9060\n\n# Capture and send packets except SIP OPTIONS and NOTIFY to 192.168.1.1:9060\n./heplify -hs 192.168.1.1:9060 -dim OPTIONS,NOTIFY\n\n# Capture SIP packet with HPERM encapsulation on port 7932 and interface eth2, send to 192.168.1.1:9060 and print debug info on stdout\n./heplify -i eth2 -bpf \"port 7932\" -hs 192.168.1.1:9060 -l debug -e\n\n# Capture SIP packet with VXLAN encapsulation on port 4789 and interface eth0, send to 192.168.1.1:9060 and print debug info on stdout\n./heplify -i eth0 -bpf \"port 4789\" -hs 192.168.1.1:9060 -l debug -e\n\n# Run heplify in \"HEP Collector\" mode in order to receive HEP input via TCP on port 9060 and fork (output) to two HEP servers listening on port 9063\n./heplify -e -hs HEPServer1:9063,HEPserver2:9063 -hin tcp:1.2.3.4:9060\n\n\n```\n### Made by Humans\n\nThis Open-Source project is made possible by actual Humans without corporate sponsors, angels or patreons.\n\nIf you use this software in production, please consider supporting its development with contributions or [donations](https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=donation%40sipcapture%2eorg\u0026lc=US\u0026item_name=SIPCAPTURE\u0026no_note=0\u0026currency_code=EUR\u0026bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest)\n\n[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=donation%40sipcapture%2eorg\u0026lc=US\u0026item_name=SIPCAPTURE\u0026no_note=0\u0026currency_code=EUR\u0026bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsipcapture%2Fheplify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsipcapture%2Fheplify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsipcapture%2Fheplify/lists"}