mirror of
https://github.com/its-a-feature/Mythic
synced 2026-06-08 14:55:38 +00:00
adding burst reads to rpfwd
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
const mythicServerVersion = "3.4.24"
|
||||
const mythicServerVersion = "3.4.25"
|
||||
|
||||
type Config struct {
|
||||
// server configuration
|
||||
|
||||
Reference in New Issue
Block a user