Register for your free account! | Forgot your password?

You last visited: Today at 22:19

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Filter programming

Discussion on Filter programming within the SRO PServer Questions & Answers forum part of the SRO Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2022
Posts: 10
Received Thanks: 0
Filter programming

Iam new at silkroad development and i want someone to help me to make filter i want just a roadmap i dont need money and i dont need someone to program it for me i just want to know all of things that i should learn to make it ,Thank you
BekaBooo is offline  
Old 11/14/2025, 01:33   #2
 
elite*gold: 0
Join Date: May 2021
Posts: 75
Received Thanks: 13
1) What is a Filter?
---------------------
A filter is a TCP proxy that sits between:
Client <—> Filter <—> Gateway/Agent Server

Main purposes:
- Inspect packets
- Block dangerous opcodes (exploits)
- Protect against flood/spam attacks
- Modify packets (rewrite data)
- Add custom rules/features
- Log all client/server communication

A filter = networking + packet parsing.

-------------------------------------------------------------

2) What you must learn first
------------------------------
A) Programming Language
Recommended:
- C# (easy for beginners)
- C++ (faster, used in professional filters)

Learn:
- OOP (classes, inheritance, interfaces)
- Multithreading
- Async sockets
- Streams and binary parsing

B) Networking Basics
- TCP handshake
- What is a proxy
- Listening on ports
- Forwarding bytes between sockets
- Handling multiple connections (threads/tasks)

C) Silkroad Packet Structure
Typical structure:
[Opcode 2 bytes]
[Security bytes]
[Length]
[Payload]

Each Silkroad version has small differences.

-------------------------------------------------------------

3) How does a filter work?
---------------------------
Basic mechanism:

1. The filter listens on a fake port (e.g., 15779).
2. The client connects to the filter.
3. The filter opens another connection to the real server.
4. Every packet goes through the filter:
- Client → Filter → Server
- Server → Filter → Client

This is a **transparent TCP proxy**.

-------------------------------------------------------------

4) Packet Logger (the most important part)
-------------------------------------------
Before you can decrypt or modify packets,
you MUST be able to **log them**.

Log format:
timestamp | direction | opcode | length | raw hex

Example:
2025-11-14T10:32:55Z | C->S | 0x7001 | 34 | 01 00 A2 7F ...

Why logging?
- You discover opcodes
- You detect handshake packets
- You understand all game behavior
- You can reverse custom features in the server

The logger is your primary tool.

-------------------------------------------------------------

5) Handshake + Encryption (simple explanation)
-----------------------------------------------
Silkroad uses a security layer (Joymax Security).

At the beginning of each connection:
- The client and server exchange keys
- Security flags are activated
- Some packets become encrypted

How to reverse it:
1. Log packets during the login phase.
2. Compare raw packets before/after forwarding.
3. Identify handshake-related opcodes.
4. Extract key bytes / seeds.
5. Implement decrypt/encrypt using the same logic.

Every client version has small variations.

-------------------------------------------------------------

6) How to build an Opcode Map
------------------------------
No one gives you a complete opcode list.
You create it yourself through logging.

Steps:
1. Log packets while performing actions in game:
- Login
- Pick items
- Move
- Attack
- Talk to NPC
- Use skills

2. Identify the opcode by watching packet patterns.

Example map:
Opcode | Direction | Description
----------------------------------------
0x2001 | C->S | Login request
0xA102 | S->C | Login response
0x7001 | C->S | Movement
0xB021 | S->C | Skill cast
0x3026 | C->S | Use item

Make your own CSV/JSON file.

-------------------------------------------------------------

7) How to start building the filter (step-by-step)
--------------------------------------------------
1. Create a .NET 6/7 Console Project.
2. Make the filter listen on a port:
TcpListener listener = new TcpListener(IPAddress.Any, 15779);

3. When a client connects:
- Connect to the real server.
- Start two tasks:
• client → filter → server
• server → filter → client

4. Before forwarding a packet:
- Parse the opcode
- Log it
- Apply rules

5. Add simple protection rules:
Example:
- Block opcode 0x3026
- Block packets larger than 10 KB
- Block users sending too many packets (flooding)

-------------------------------------------------------------

8) Easy features you can build later
-------------------------------------
- HWID/IP limit system
- Anti-flood & anti-spam
- Ban players when sending forbidden packets
- Detect bot-like packet timing
- Job penalty / anti-cheat features
- Custom teleport restrictions
- Auto-block exploit packets

-------------------------------------------------------------

9) Best resources to learn from (search for them)
--------------------------------------------------
- SilkroadSecurityApi (C# / C++)
- xFilter source code
- SRO_Proxy (open-source)
- ProjectHax Silkroad Development section
- Elitepvpers Silkroad Section
romio100 is offline  
Thanks
2 Users
Old 01/12/2026, 22:59   #3
 
Rekcuz's Avatar
 
elite*gold: 100
Join Date: Jul 2015
Posts: 71
Received Thanks: 45
Romios Roadmap is pretty detailed..
If you need someone to take your hand and lead you trough the ****** begin of the filter architecture, hand out to me for some call sessions.
I been looking for ppl like you for years.. My passion to help, not handing out solutions or rdy build apps.
I can literally feel your motivation, and i LOVE IT!!!
Rekcuz is offline  
Reply




All times are GMT +1. The time now is 22:19.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.