Commit Graph
100 Commits
Author SHA1 Message Date
Leonid Bugaev 5b0dc99caa Ignore deb files 2021-06-10 15:01:55 +03:00
Leonid Bugaev 972c59abfe Fix merge issue 2021-06-10 14:53:15 +03:00
Leonid BugaevandGitHub 58ff8865df Fix windows packet capture (#943)
Issues is that Go built-in net.Interfaces function in newer Windows versions return wrong interface names, which libpcap can't consume.
Now we use pcap.FindDevices instead of net.Interfaces.
See this Article for deep understanding of the issue https://haydz.github.io/2020/07/06/Go-Windows-NIC.html

Additionally, found a bug causing big memory allocations, for large requests, when we perform check if messages finished or not.
Because of this bug chunked body encoding check was not working properly.
Was not caught in tests, because test was working on packet array level, and this issue happens when dealing with TCP message object.

Additionally, added a small fix for windows Makefile task, it now generates proper file name.
2021-06-10 14:46:17 +03:00
Leonid Bugaev 763ad9b051 Merge branch 'DimaGolomozy-more-exact-bpf-filter' 2021-06-09 18:26:09 +03:00
Leonid Bugaev b1972fb0a8 Add way to test looping from webserver to itsef 2021-06-09 18:25:31 +03:00
Leonid Bugaev f00817c13e Add windows support (#940)
For a long time there were no official binaries for the windows platform.
One of the reasons is the complexities of the build toolchain. Not only CGO is required, but also installing the needed libraries and header files, not talking about mingw and etc.

2 weeks ago [golang-crossbuild](https://github.com/elastic/golang-crossbuild) project added native support for Libpcap based applications.
Windows support is based on the WinPcap which is a bit (a lot) outdated, BUT, since we depend only on its interface, it is still possible to use projects like npcap https://nmap.org/npcap/#download.

Npcap needs be installed with WinPcap compatibe mode (checkbox during installation)
It is also possibe install it in silent mode like this: `npcap-0.86.exe /S /winpcap_mode=yes`

After PR merge, will be updated related documentation.

Additionally fix dependency on "unix" package (apparently it can be totally replaced using universal syscall package)
2021-06-09 18:08:11 +03:00
Leonid Bugaev ebe9e222f3 Bump version 2021-06-09 18:08:11 +03:00
Leonid Bugaev f2857424b0 Update to use Go 1.15 and latest libpcap 2021-06-09 18:08:11 +03:00
Leonid BugaevandGitHub 07a4ef626c Add windows support (#940)
For a long time there were no official binaries for the windows platform.
One of the reasons is the complexities of the build toolchain. Not only CGO is required, but also installing the needed libraries and header files, not talking about mingw and etc.

2 weeks ago [golang-crossbuild](https://github.com/elastic/golang-crossbuild) project added native support for Libpcap based applications.
Windows support is based on the WinPcap which is a bit (a lot) outdated, BUT, since we depend only on its interface, it is still possible to use projects like npcap https://nmap.org/npcap/#download.

Npcap needs be installed with WinPcap compatibe mode (checkbox during installation)
It is also possibe install it in silent mode like this: `npcap-0.86.exe /S /winpcap_mode=yes`

After PR merge, will be updated related documentation.

Additionally fix dependency on "unix" package (apparently it can be totally replaced using universal syscall package)
2021-06-09 09:46:41 +03:00
Leonid Bugaev 71a338cb02 Bump version 2021-06-09 07:04:27 +03:00
Leonid Bugaev 14143e46ca Update to use Go 1.15 and latest libpcap 2021-06-09 07:02:09 +03:00
Leonid Bugaev 40a3c51c9c Fix Makefile 2020-11-22 20:10:00 +03:00
Leonid Bugaev 839b41f91c Fix scripts to build packages, and MacOS pkg, and remove java dependency
Plus updated version.go
2020-07-06 14:51:54 +03:00
Leonid Bugaev 540e42b9d4 Add more PRO protection 2020-06-08 14:35:38 +03:00
Leonid Bugaev 15bd2608f7 Fix Makefile 2020-06-08 14:34:19 +03:00
Leonid Bugaev d67bc13db3 Merging PRO functionality back to OSS repo 2020-06-08 14:29:32 +03:00
Leonid Bugaev ab2ba8400d Improve S3 debugging 2020-06-06 17:07:51 +03:00
Leonid BugaevandGitHub 40d57cac36 Create .clabot 2020-05-15 07:03:40 +03:00
Leonid Bugaev fa56e7644c More verbose S3 logging 2020-03-06 18:04:16 +03:00
Leonid Bugaev ae4a6259c2 Improve benchmark 2019-09-16 18:20:49 +03:00
Leonid Bugaev df143cdeec Update to latest upstream master 2019-05-18 10:36:46 +03:00
Leonid Bugaev 64cf9e5509 Merge remote-tracking branch 'upstream/master' 2019-05-13 20:47:06 +03:00
Leonid Bugaev daddbb9c42 Merge branch 'swills-gomod' 2019-05-13 20:40:08 +03:00
Leonid Bugaev 34954eb8e8 Use vendoring 2019-05-13 20:38:06 +03:00
Leonid Bugaev 81e8f98ab6 Merge remote-tracking branch 'upstream/master' 2019-05-13 20:20:06 +03:00
Leonid Bugaev 36ca809e4a Add commands to generate rpm/deb 2019-04-02 10:21:59 +07:00
Leonid BugaevandGitHub 107740b57d Update README.md 2019-03-30 21:30:06 +07:00
Leonid Bugaev 7300b83894 Merge remote-tracking branch 'upstream/master' 2019-03-29 22:50:04 +07:00
Leonid Bugaev c48d07d2c6 Merge remote-tracking branch 'upstream/master' 2019-03-29 22:45:27 +07:00
Leonid Bugaev a8cfaa7581 Add --output-http-compatibility-mode
Add support for using default Go HTTP client
2019-03-10 10:29:28 +01:00
Leonid BugaevandGitHub 707b311456 Add deleteHttpCookie method (#658)
Version bumped to 1.0, together with upcoming GoReplay release
2019-03-07 22:45:17 +01:00
Leonid Bugaev e3f3348105 Update gopacket 2019-02-16 10:13:03 +01:00
Leonid Bugaev 408f1d0f31 Merge branch 'bruce34-b34-pcap-immediate-mode' 2019-02-16 09:40:18 +01:00
Leonid Bugaev f57703ee5c Merge branch 'b34-pcap-immediate-mode' of https://github.com/bruce34/goreplay into bruce34-b34-pcap-immediate-mode 2019-02-16 09:40:02 +01:00
Leonid Bugaev 264d8cf00e Add more error handling 2019-02-16 09:37:00 +01:00
Leonid Bugaev ec3f104c8c Add way to dynamically profile
Added new `--http-pprof` option, example: "--http-pprof :8181"
It starts web server on given address, and expose special /debug/pprof
endpoint

See https://golang.org/pkg/net/http/pprof/
2019-02-16 08:59:43 +01:00
Leonid Bugaev 85c6070775 File output now case limit by size
Added new `output-file-max-size-limit` option
2019-02-16 08:49:31 +01:00
Leonid Bugaev b4a2c018c1 Fix request filtering issue
https://github.com/buger/goreplay/issues/648
2019-01-25 20:00:22 +01:00
Leonid Bugaev 3fa4a8feb7 Merge remote-tracking branch 'upstream/master' 2019-01-24 23:54:26 +01:00
Leonid Bugaev fb3870d68c Fix --http-allow-header to filter non existent headers
Fix https://github.com/buger/goreplay/issues/604
2019-01-24 23:47:14 +01:00
Leonid Bugaev 6eea02ee86 Add Demo mode 2019-01-24 23:37:53 +01:00
Leonid Bugaev 962087065a S3 fixes 2019-01-22 23:08:23 +01:00
Leonid Bugaev 166c8e8d87 Merge remote-tracking branch 'upstream/master' 2018-08-24 16:35:39 +05:00
Leonid Bugaev 52ed8b4d1e Add protection for malformed records 2018-08-24 16:35:04 +05:00
Leonid Bugaev c8cf370b62 Merge remote-tracking branch 'upstream/master' 2018-08-10 21:35:19 +05:00
Leonid Bugaev 29139e9eda Fix prefixer panic when body is too small 2018-08-10 21:34:00 +05:00
Leonid Bugaev d0d1527d9b Merge remote-tracking branch 'upstream/master' 2018-08-08 22:00:20 +05:00
Leonid Bugaev c63f2a8113 Remove java from dev docker 2018-08-08 20:47:47 +05:00
Leonid Bugaev 0ffe3edcbf Update S3 lib and add more debugging 2018-08-02 21:54:37 +05:00
Leonid Bugaev a97c04b9e2 Use must instead of new 2018-08-02 21:51:13 +05:00
Leonid Bugaev 61301e78b1 Fix merge 2018-08-02 21:44:53 +05:00
Leonid Bugaev eeb09a1494 Merge 2018-08-02 21:42:45 +05:00
Leonid Bugaev 68082bfb11 Fix typo 2018-08-02 21:41:36 +05:00
Leonid Bugaev 28d646d118 Merge branch 'master' of https://github.com/buger/gor 2018-08-02 21:39:42 +05:00
Leonid BugaevandGitHub c93ff3598c Fix prettifier buffer overflow 2018-08-02 21:36:47 +05:00
Leonid Bugaev 9eb6ab262b Add "deleteHttpHeader" 2018-06-22 22:11:29 +05:00
Leonid Bugaev edae33717e Improve start/end time calculation 2018-05-28 10:05:07 +03:00
Leonid Bugaev c5d1112e7a Add way to control packet capture buffer size and optimize snaplen
Added `—input-raw-buffer-size` - Controls size of the OS buffer (in
bytes) which holds packets until they dispatched. Default value depends
by system: in Linux around 2MB. If you see big package drop, increase
this value.

Additionally snaplen (max number of bytes being read for each packet)
now dynamically set based on interface MTU + max header size. In most
situations it should reduce package drop, because each packet will
consume less space in buffer.
2018-05-27 12:31:47 +03:00
Leonid Bugaev 0c0ef97b67 Add additional tests 2018-05-12 15:17:26 +03:00
Leonid Bugaev fe6cfd90fe Fix responses when header end line separated by multiple packets 2018-05-10 22:19:56 +03:00
Leonid Bugaev c9fe4a11ad Fix proto.Body when body < 4 bytes 2018-05-10 22:19:08 +03:00
Leonid Bugaev e9294aeb5f Fix emitter typo 2018-05-10 22:18:47 +03:00
Leonid Bugaev cb1ae0e7c0 Revert "Update middleware.js"
This reverts commit 2db143aaef.
2018-04-24 19:42:37 +03:00
Leonid Bugaev 52f4ad03f3 Ensure that tcp-output do not loose messages when reconnecting 2018-02-07 20:34:29 +02:00
Leonid Bugaev 35a5957801 Increase buffer size 2018-02-07 20:33:24 +02:00
Leonid Bugaev d265594b00 Ensure that tcp-output do not loose messages when reconnecting 2018-02-07 20:29:19 +02:00
Leonid Bugaev 0097c599df Fix response latency calculation
Previously latency calcualted as Response.End - Request.Start
Where both End and Start is a last and first packets

This calcualtion is wrong, because it is total roundtrip

Correct server latency will be Response.End - Request.End

In addition added new `--input-raw-timestamp-type` option
which allows choose more precise packet timestamp source (if available).
2018-02-05 21:47:48 +02:00
Leonid Bugaev 5bd47ee1df Merge branch 'master' of https://github.com/buger/gor 2018-01-10 21:24:38 +02:00
Leonid Bugaev 45d7527128 Increase middleware buffer to avoid overloads when prettifier returns buffer larger then original 2018-01-10 21:23:55 +02:00
Leonid Bugaev debb265d6d Fix memory leak 2017-10-04 20:18:05 +03:00
Leonid Bugaev c5f12b567b Add log helper and fix memory leak 2017-09-24 22:32:03 +05:00
Leonid BugaevandGitHub 4255d4155f Improve handling for 100-continue requests for clients ignoring response (#513)
Some clients, even if have `Expect: 100-continue` in request, start
sending data without waiting approval from the server. More over, there
is cases when response “100 Continue” is received, client changes TCP
seq, and following requests start having valid sequences, based on
response one.

This change should address this bugs.

As small addition extended list of http methods, to fully support
webdav.
2017-09-15 19:25:46 +05:00
Leonid Bugaev 927215bd9b Merge branch 'master' of https://github.com/buger/gor 2017-09-14 22:38:51 +05:00
Leonid Bugaev 08efdef37a Merge 2017-09-14 22:37:34 +05:00
Leonid Bugaev 4bb64be27e Fix panic when reading too big response in debug mode 2017-09-14 22:35:45 +05:00
Leonid Bugaev e310fc8369 Fix zero-length 100-continue packets
Should fix https://github.com/buger/goreplay/issues/496
2017-09-03 22:11:42 +05:00
Leonid BugaevandGitHub c8f4493eca Update COMM-LICENSE
Misc improvements
2017-08-28 19:26:24 +05:00
Leonid Bugaev 0f8e2f2d52 Merge branch 'master' of https://github.com/buger/gor 2017-08-22 20:43:22 +05:00
Leonid Bugaev 74a5c8570d Update s3 version 2017-08-22 20:33:42 +05:00
Leonid Bugaev 1c3cd633d1 Fix bpfFilter 2017-08-22 17:20:45 +05:00
Leonid Bugaev b8befff286 Sync makefile 2017-08-22 17:07:37 +05:00
Leonid Bugaev 2b79791fe6 Reading from pcap file should properly set src and dest ports 2017-08-22 17:07:37 +05:00
Leonid Bugaev 39ebff56b4 Update to use latest docker.dev 2017-08-22 17:07:37 +05:00
Leonid Bugaev cf402a1d0e Add option to specify custom BPF filter
Can be useful in case of non standard network interfaces when like
tunnels or SPAN ports, when IP of interface does not match with IP of
packet.

Can be used to read traffic from multiple ports and interfaces at once
as well.
2017-07-27 17:56:33 +03:00
Leonid Bugaev 211b16888e Merge remote-tracking branch 'upstream/master' 2017-07-20 21:10:05 +03:00
Leonid Bugaev 06ec570286 Merge remote-tracking branch 'upstream/master' 2017-07-20 21:09:04 +03:00
Leonid Bugaev 09f47b25bf Fix panic for non compilant http requests 2017-07-20 21:02:07 +03:00
Leonid Bugaev 652e589e2b fix proto.Path 2017-06-30 15:58:45 +02:00
Leonid Bugaev 163bf1f1c0 0.16 updates 2017-06-29 21:55:49 +02:00
Leonid Bugaev 5aa1696680 Add TLS security support between --input-tcp and --output-tcp 2017-06-27 17:11:34 +02:00
Leonid Bugaev 21531cea9a Add support for rewriting headers 2017-06-27 15:30:34 +02:00
Leonid Bugaev 03767d1a77 Add support for HTTP 1.0 and less 2017-06-27 14:24:43 +02:00
Leonid Bugaev 2680ce9dd4 Fix #467 2017-06-27 14:01:17 +02:00
Leonid Bugaev b3dffae66f When using --input-file it should exit once file is fully read 2017-06-27 13:56:14 +02:00
Leonid Bugaev aa4a878436 Handle gzip encoding error
Fix #470
2017-06-24 20:35:35 +02:00
Leonid BugaevandGitHub a1a4460c90 Update Dockerfile 2017-05-18 16:53:11 +03:00
Leonid BugaevandGitHub 2b20c1107a Update Dockerfile 2017-05-18 16:52:46 +03:00
Leonid BugaevandGitHub d755c579e4 Create Dockerfile 2017-05-18 16:47:41 +03:00
Leonid BugaevandGitHub 064519ce89 Rename Dockerfile to Dockerfile.dev 2017-05-18 16:40:42 +03:00
Leonid BugaevandGitHub cdd818fe77 Update README.md 2017-05-17 22:48:45 +03:00