1326 Commits
Author SHA1 Message Date
Leonid Bugaev 251e45abd2 Create probe.yaml 2025-04-05 12:47:29 +03:00
Fabian Heymann 9c65b45062 Update dependencies with security vulnerabilities (#1264) 2025-04-04 13:50:01 +03:00
Leonid Bugaev 94d3eef826 Update goreplay.yaml 2025-01-26 12:57:30 +03:00
Leonid Bugaev 1e6c48bcde Update README.md 2025-01-26 12:54:59 +03:00
Leonid Bugaev 23193b7d62 Create collect_goreplay_telemetry.sh 2025-01-26 12:49:47 +03:00
Leonid Bugaev 6f3a6dcc98 Update README.md 2025-01-26 12:49:23 +03:00
Leonid Bugaev b00413879c Update README.md 2025-01-26 11:50:02 +03:00
Leonid Bugaev 7ccde5a373 Update README.md 2025-01-26 11:42:53 +03:00
Leonid Bugaev 8230bc9b99 Fix build issue for PRO version 2024-11-05 20:55:17 +03:00
Leonid Bugaev cca448bb9e Fix issue after merging PRO code 2024-10-25 15:05:42 +03:00
Leonid Bugaev d3c95f155d Improve build scripts 2024-10-25 14:37:43 +03:00
Leonid Bugaev 2e7d26c97d Add missing PRO functionality and improve license protection 2024-10-23 17:52:28 +03:00
Zapan Gao abbd249c49 Adding support for specify input kafka offset for each partitions (#1242)
Adding a new flag `--input-kafka-offset` for supporting consumes from Kafka by specified offset.
2024-04-09 11:55:03 +03:00
Leonid Bugaev 79e123cbb6 Update README.md 2024-03-20 13:30:03 +03:00
Eliel Amora (AuditBoard) 21b83875f8 bring back original language in section 9 (#1243) 2024-03-08 12:08:23 +03:00
Leonid Bugaev 5c7cb596ee License changes (#1241)
* License changes

* Update COMM-LICENSE

* Update COMM-LICENSE
2024-03-07 17:48:53 +03:00
ivan-stankov-salt-security fd62d693ee add GetInitMessage and WriteBeforeMessage to output_tcp.go (#1193)
* add GetInitMessage and WriteBeforeMessage to output_tcp.go

* try to fix code duplication
2023-08-07 16:47:15 +03:00
ivan-stankov-salt-security 3062446395 add Headers to output_ws.go (#1192) 2023-06-03 21:12:37 +03:00
codesee-maps[bot] e546fdb631 Install the CodeSee workflow. Learn more at https://docs.codesee.io 2023-05-20 11:34:33 +00:00
Jauder Ho 3be10be730 Update Go dependencies (#1174)
* Update Go dependencies

Signed-off-by: Jauder Ho <jauderho@users.noreply.github.com>

* Update Go dependencies

Signed-off-by: Jauder Ho <jauderho@users.noreply.github.com>

---------

Signed-off-by: Jauder Ho <jauderho@users.noreply.github.com>
2023-05-13 21:07:45 +03:00
Jauder Ho ba4f5753be Update dependabot.yaml (#1173)
Extend Dependabot to manage Go and Docker dependencies
2023-05-13 11:22:29 +03:00
ivan-stankov-salt-security ad503d45cb fix output_ws and output_tcp deadlock (#1172) 2023-04-28 10:07:41 +03:00
Leonid Bugaev dbd10c320a Update README.md 2023-03-24 22:45:00 +03:00
semgrep.dev on behalf of @buger e463ba3a53 Add Semgrep CI 2023-03-22 14:50:56 +00:00
Dima Golomozy 40946831b9 goreplay-cli package (#1148)
change package from `main -> goreplay`
this will allow importing `goreplay` as a package
2023-01-12 18:24:45 +03:00
Dima Golomozy 99e6fdfd60 output-ws (#1136)
* add websocket output

* add tests

* update mod
2023-01-10 09:10:23 +03:00
Dima Golomozy 23825d82f5 release-tars (#1149)
- removed deb/rpm/pkg packages
- archiving with `.tar.gz` and `.zip`
- change archive naming
2023-01-10 09:09:13 +03:00
Dima Golomozy f53d6c4466 go-bump-1.19 (#1083) 2022-11-09 22:20:32 +03:00
Leonid Bugaev 243b2cf484 Update CNAME 2022-09-26 14:38:18 +03:00
Leonid Bugaev c2e7a0f777 Update CNAME 2022-09-26 14:37:55 +03:00
dependabot[bot] f3bb50192c Bump docker/setup-buildx-action from 1 to 2 (#1085)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-23 17:02:05 +03:00
dependabot[bot] 2497e48e8d Bump actions/checkout from 2 to 3 (#1062)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-23 17:01:54 +03:00
dependabot[bot] a289b03483 Bump docker/build-push-action from 2 to 3 (#1086)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 3.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-23 17:01:34 +03:00
choi se 951cd72a92 Support SASL Protocol of Kafka (#1092)
* Support SASL Protocol of Kafka

* Add comments

* Fix Unused parameter detected in function RVV-B0012
2022-07-23 17:00:43 +03:00
dependabot[bot] 655eacc546 Bump actions/cache from 2.1.4 to 3.0.5 (#1098)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.4 to 3.0.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2.1.4...v3.0.5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-23 17:00:04 +03:00
byte0o 752b457501 fix set multiple output http url does not work (#1097) 2022-07-23 16:59:43 +03:00
Dan Pegg 161e6bf08e Fix binary download, use alpine:16, copy root certificates into final image (#1100)
Scratch doesn't have root certificates by default, which means forwarding to a HTTPS endpoint doesn't work without skipping verification. To fix this, we can copy the certificate bundle into scratch from the alpine image.

I've also bumped the alpine version up to 3.16, and fixed the wget.

This has fixed my issues, but let me know if you think anything looks wrong here!
2022-07-22 21:17:15 +03:00
Ramón Márquez ef925b70b4 Fix buger/goreplay#1095 (#1099)
The `copySlice` function inside `tcp_packet.go` wouldn't copy elements from the `from` slices to the `to` slice, even when the `to` slice has "space" to spare due to its `cap` being larger than the `totalLen`:

```go
func copySlice(to []byte, skip int, from ...[]byte) ([]byte, int) {
	var totalLen int
	for _, s := range from {
		totalLen += len(s)
	}
	totalLen += skip

	if cap(to) < totalLen {
		diff := totalLen - cap(to)
		to = append(to, make([]byte, diff)...)
	}

	for _, s := range from {
		skip += copy(to[skip:], s)
	}

	return to, skip
}
```

This is caused because Go's `copy` function used in `copySlice` will copy a number of elements ["which will be the minimum of len(src) and len(dst)."](https://pkg.go.dev/builtin#copy). For the built-in copy function to copy elements into a slice, the destination slots must be initialized for this slice, not just allocated in the underlying array. In other words, `len` must be used instead of `cap` to allow `copy` to work properly.

This PR closes #1095, which is an example of the effects of this issue: when mirroring packets using VXLAN, the raw payloads obtained using the vxlan engine can be large due to encapsulation. This has the effect of giving the `tmp` slice a large `cap` when `PacketData()` is called inside `tcp_message.go`. Then, the `to` slice is never resized in `copySlice` and only the first packet is read, without the rest (e.g. no response body, only headers are read).
2022-07-21 14:10:10 +03:00
Leonid Bugaev d785acbc4e Change to use new legal entity 2022-05-29 17:53:29 +03:00
旺汪 a14cc2f077 Update input_dummy.go (#1070)
make code cleaner
2022-03-28 20:16:54 +03:00
Leonid Bugaev d440b3dc8f K8s native support (#1052)
Now you are be able to capture traffic inside k8s like this:

```
gor --input-raw k8s://namespace/deployment/app:80 --output-http http://replay.com
```

Supported format for filtering required pods:

```
k8s://[namespace/]pod/[pod_name] - k8s://default/pod/nginx-7848d4b86f-5nxz8
k8s://[namespace/]deployment/[deployment_name] - k8s://default/deployment/nginx
k8s://[namespace/]daemonset/[daemonset_name] - k8s://default/daemonset/nginx
k8s://[namespace/]labelSelector/[selector] - k8s://default/labelSelector/app=nginx
k8s://[namespace/]fieldSelector/[selector] - k8s://default/fieldSelector/metadata.name=nginx-7848d4b86f-5nxz8
```

`namespace` is optional, omit to use all namespaces: `k8s://labelSelector/app=replay`

GoReplay designed to be running running as a daemonset (e.g. on each physical k8s node). 

See the full guide in here: https://github.com/buger/goreplay/blob/ca8205a5c5d2a1facb00214c78e4120aae6d772d/k8s/README.md
2022-02-12 21:01:03 +03:00
Leonid Bugaev 169de158ed Add option to skip interfaces and automatically discover new ones (#1049)
In k8 environment, when listening as daemon set, k8s creates a bunch of virtual interfaces for your traffic with random names like `eni1323`, but in addition it has a classical eth0, or NAT ones like cbr0, which you do not want to listen.

With this option, you now can listen traffic on all virtual interfaces and ignore internal k8s traffic. Example:
`--input-raw-ignore-interface cbr0 --input-raw-ignore-interface eth0 --input-raw-ignore-interface lo`

Also added simple glob pattern `*` for matching multiple interfaces: `--input-raw veth*:80`

Additionally, when you add/remove pod k8s can dynamically add/remove interfaces from the system as well. 
Previously, you had to restart the process to notice these changes, now new interfaces detected dynamically, and it automatically starts capture on them. Full example for `GoReplay` to be used as daemon on k8s env:

```
gor --input-raw veth*:80 --output-stdout
```

While running, you will see additional log messages:
```
Found new interface: utun4
Interface: utun4 . BPF Filter: ((tcp dst port 80) and (dst host 10.8.0.2))
```
2022-02-12 20:34:21 +03:00
dependabot[bot] 7f1760619e Bump actions/cache from v2 to v2.1.4 (#898)
Bumps [actions/cache](https://github.com/actions/cache) from v2 to v2.1.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...26968a09c0ea4f3e233fdddbafd1166051a095f6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-12 10:14:19 +03:00
reoring a62930856a fix: release package url is incorrect (#1011) 2022-02-12 10:13:04 +03:00
Erik Schweller f780d4a21d Drop 1.15.x, bring in 1.17.x (#1033) 2022-02-12 10:12:49 +03:00
旺汪andwangfeng115 18f33fb4f7 introduce freecache to avoid golang map OOM (#1039)
Co-authored-by: wangfeng115 <wangfeng115@ke.com>

Using the freecache library to avoid golang map OOM. As follows
https://github.com/golang/go/issues/20135
2022-02-12 10:12:33 +03:00
Alex Philipp b09d90aef9 Fix typos/grammar (#1046) 2022-02-12 10:11:48 +03:00
Dody Suria WijayaandDody Suria Wijaya a4962b5d2d fix swapped rtt parameter (#1053)
Co-authored-by: Dody Suria Wijaya <dodysw@gmail.com>

fix small bug that caused output_binary rtt and start time to be swapped
2022-02-12 10:10:54 +03:00
Leonid Bugaev a5f5615156 Add support for VXLAN and VLAN (#1051)
Added support for capturing virtualized traffic.

## VXLAN
https://en.wikipedia.org/wiki/Virtual_Extensible_LAN

VXLAN implemented as separate engine, which opens UDP socket and awaits traffic. 
This approach is made to work with AWS Traffic Mirroring.

In order to enable VXLAN set `--input-raw-engine vxlan`

Example:
```
gor --input-raw :80 --input-raw-engine vxlan --output-stdout`
```

By default, it looks for vxlan traffic on the standard 4789 port, but you can override it with `--input-raw-vxlan-port`. 
Additionally, you can allow only specific VNIs using `--input-raw-vxlan-vni`, or disallow by using the same option, but by adding "minus" sign to the value: `--input-raw-vxlan-vni -2`. 

Example with all options:
```
gor --input-raw :80 --input-raw-engine vxlan --input-raw-vxlan-vni 1 --input-raw-vxlan-vni 2 --input-raw-vxlan-port 2222 --output-stdout
```

# VLAN
https://en.wikipedia.org/wiki/IEEE_802.1Q

VLAN protocol enabled using `--input-raw-vlan` argument, and you can filter for specific VLAN VIDs using `--input-raw-vlan-vid`. VLAN filtering happens on BPF level.

Example:
```
gor --input-raw :80 --input-raw-vlan --input-raw-vlan-vid 1 --output-stdout`
```

## Notes

Did a refactoring of RAW Input options, so it will be easy to extend in future.
2022-02-12 10:10:26 +03:00
Leonid Bugaev b520511c96 Revert "Make packet proccessing multi threaded"
This reverts commit 11d61dcb4d.
2022-02-04 18:32:20 +03:00