Powerful golang network framework, supporting FFAX Protocol

X.NET framework

Install

$ go get github.com/RealFax/XNET

This is a high-performance network framework, currently only supports tcp and FFAX protocol

Using goroutine and pointer passing, you can quickly generate a high-performance cloud stream application

How to work?

Think of XNET as a water pipe. You can set the size of the water pipe and the other end of the water pipe. This is XNET, and it integrates chunk, stream and other functions.

Quick start

package main

import (
	"fmt"
	"github.com/RealFax/FFAX/packet"
	xNet "github.com/RealFax/XNET"
	"net"
)

const (
	MaxConnection int64 = 100
)

func tcpCallBack(conn net.Conn, service xNet.React)  {
	buf := make([]byte, 1024)
	for {
		n, err := conn.Read(buf)
		if err != nil {
			return
		}
		fmt.Println(string(buf[:n]))
	}
}

func ffaxCallBack(conn net.Conn, secret []byte, service xNet.React)  {
	buf := make([]byte, 1024)
	for {
		n, err := conn.Read(buf)
		if err != nil {
			return
		}
		header, message, err := packet.DePacket(buf[:n], secret)
		if err != nil {
			return
		}
		fmt.Println(string(message))
		for k, v := range header {
			fmt.Printf("%s: %x\n", k, v)
		}
	}
}

func main()  {
	s, err := xNet.Listen("tcp", ":8080")
	if err != nil {
		return
	}
	s.SetMaxConnection(MaxConnection)
	s.SetFunc(tcpCallBack)
	s.Start()
}

Alert

This project has many experimental features, please use it with caution

Owner
Realfax Messenger
Realfax Messenger LLP, Originated in 2019
Realfax Messenger
Similar Resources

Capture packet request/response pairs for a port and/or IP to aid in Network protocol based Nuclei Templates creation.

network-fingerprint Capture packet request/response pairs for a port and/or IP to aid in Network protocol based Nuclei Templates creation. Resources I

Nov 15, 2022

Fast implementation of the collectd network protocol for go.

go-cdclient A fast, dependency free implementation of the collectd binary network protocol. How fast? This package can form an encrypted metric packet

Feb 6, 2022

Steam's protocol in Go to allow automation of different actions on the Steam network without running an actual Steam client

Steam's protocol in Go to allow automation of different actions on the Steam network without running an actual Steam client. Includes APIs for friends, chatting, trading, trade offers and TF2 crafting.

Jan 4, 2023

Package socket provides a low-level network connection type which integrates with Go's runtime network poller to provide asynchronous I/O and deadline support. MIT Licensed.

socket Package socket provides a low-level network connection type which integrates with Go's runtime network poller to provide asynchronous I/O and d

Dec 14, 2022

Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core network solution.

Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core network solution.

Connecting the Next Billion People Magma is an open-source software platform that gives network operators an open, flexible and extendable mobile core

Dec 31, 2022

Optimize Windows's network/NIC driver settings for NewTek's NDI(Network-Device-Interface).

windows-ndi-optimizer[WIP] Optimize Windows's network/NIC driver settings for NewTek's NDI(Network-Device-Interface). How it works This is batchfile d

Apr 15, 2022

A simple network analyzer that capture http network traffic

A simple network analyzer that capture http network traffic

httpcap A simple network analyzer that captures http network traffic. support Windows/MacOS/Linux/OpenWrt(x64) https only capture clienthello colorful

Oct 25, 2022

A TCP Server Framework with graceful shutdown, custom protocol.

xtcp A TCP Server Framework with graceful shutdown,custom protocol. Usage Define your protocol format: Before create server and client, you need defin

Dec 7, 2022

NFF-Go -Network Function Framework for GO (former YANFF)

Network Function Framework for Go (former YANFF) Wonderful news : we are now supporting AF_XDP and supporting(almost) getting packets directly from Li

Dec 28, 2022
Related tags
wire protocol for multiplexing connections or streams into a single connection, based on a subset of the SSH Connection Protocol

qmux qmux is a wire protocol for multiplexing connections or streams into a single connection. It is based on the SSH Connection Protocol, which is th

Dec 26, 2022
A simple tool to convert socket5 proxy protocol to http proxy protocol

Socket5 to HTTP 这是一个超简单的 Socket5 代理转换成 HTTP 代理的小工具。 如何安装? Golang 用户 # Required Go 1.17+ go install github.com/mritd/s2h@master Docker 用户 docker pull m

Jan 2, 2023
A Go package for sending and receiving ethernet frames. Currently supporting Linux, Freebsd, and OS X.

ether ether is a go package for sending and receiving ethernet frames. Currently supported platform: BPF based OS X FreeBSD AF_PACKET based Linux Docu

Sep 27, 2022
A STOMP Client package for go developers, supporting all STOMP specification levels.

stompngo - A STOMP 1.0, 1.1 and 1.2 Client Package Features Full support of STOMP protocols: Protocol Level 1.0 Protocol Level 1.1 Protocol Level 1.2

Oct 19, 2022
A MCBE Proxy supporting fast transfer and much more!
A MCBE Proxy supporting fast transfer and much more!

Downloads Pipelines Here you can find all the build please select the latest and click Artifacts

Oct 17, 2022
A load balancer supporting multiple LB strategies written in Go
A load balancer supporting multiple LB strategies written in Go

farely A load balancer supporting multiple LB strategies written in Go. Goal The goal of this project is purley educational, I started it as a brainst

Dec 21, 2022
A structure generating tool for Minecraft Bedrock Edition that supporting various platforms

FastBuilder Phoenix Description FastBuilder is a structure generating tool for Minecraft Bedrock Edition that supporting various platforms. The Phoeni

Dec 10, 2021
Jun 23, 2022
network multiplexing and framing protocol for RPC

TChannel Network multiplexing and framing protocol for RPC Read the Docs Languages: Node.js, Python, Go, Java Questions: Open a Github issue Uber's OS

Nov 26, 2022