adding burst reads to rpfwd

This commit is contained in:
its-a-feature
2026-03-04 17:44:44 -06:00
parent 51c0eeb5df
commit e7fde3fcde
4 changed files with 15 additions and 3 deletions
+6
View File
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [3.4.25] - 2026-03-04
### Changed
- Updated rpfwd to do burst proxy reads similar to socks
## [3.4.24] - 2026-02-18
### Changed
+1 -1
View File
@@ -1 +1 @@
3.4.24
3.4.25
@@ -1695,11 +1695,17 @@ func (p *callbackPortUsage) handleRpfwdConnections(newConnection *acceptedConnec
}(newConnection.conn)
go func(conn net.Conn) {
// function for reading from Mythic's connections to send to agents
lastReadSizes := []int{0, 0, 0}
tempBufSize := minAllocSize
for {
buf := make([]byte, 4096)
tempBufSize = p.burstAdjustReadSize(lastReadSizes, tempBufSize)
buf := make([]byte, tempBufSize)
//logging.LogDebug("looping to read from connection", "server_id", newConnection.ServerID)
length, err := conn.Read(buf)
if length > 0 {
lastReadSizes[0] = lastReadSizes[1]
lastReadSizes[1] = lastReadSizes[2]
lastReadSizes[2] = length
//logging.LogDebug("Message received for chan %d: length %v\n", newConnection.ServerID, length)
interceptProxyToAgentMessageChan <- interceptProxyToAgentMessage{
Message: proxyToAgentMessage{
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"github.com/spf13/viper"
)
const mythicServerVersion = "3.4.24"
const mythicServerVersion = "3.4.25"
type Config struct {
// server configuration