Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to actually - "Handle/modify incoming and outgoing data"? #39

Open
SiriusED opened this issue Apr 2, 2024 · 0 comments
Open

How to actually - "Handle/modify incoming and outgoing data"? #39

SiriusED opened this issue Apr 2, 2024 · 0 comments

Comments

@SiriusED
Copy link

SiriusED commented Apr 2, 2024

Basically subject.. How to do it? I tried to use plugin DataHandlerExample and tried to receive data in the OnServerDataReceived(object? sender, DataEventArgs e) by using PacketDotNet library, but can't read any IPPackets from the e.Buffer. Here is my code I tried to read packets through this plugin:

public override void OnServerDataReceived(object? sender, DataEventArgs e)
{
	var packet = Packet.ParsePacket(LinkLayers.Ethernet, e.Buffer); // This reads Ethernet packet
	
	// Then I try to extract IPPacket
	var ipPacket = packet.Extract<IPPacket>();
	
	// But getting `ipPacket` always null
}

So, how to read and modify data between Client and Server sockets in this SOCKS server?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant