FFAX

command module
v0.5.5-beta1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

README ¶

FFAX Protocol 2 dev

简体中文

Welcome to FFAX Protocol v2

Quick start
  1. go get github.com/RealFax/FFAX
 func example()  {
	listener, err := net.Listen("tcp", "0.0.0.0:8080")
	if err != nil {
		log.Error(err.Error())
		return
	}
	for {
		var conn       net.Conn
		var err  	   error
		var key, data  []byte
		if conn, err = listener.Accept(); err != nil {
			log.Error(err.Error())
			continue
		}
		if key, err = packet.AesSecretExchange(conn); err != nil {
			log.Error(err.Error())
			continue
		}
		if data, err = crypto.Aes([]byte("Hello, FFAX Protocol"), key).Encrypt(); err != nil {
			log.Error(err.Error())
			continue
		}
		conn.Write(data)
	}
}
👀Quick preview of this update
  • Use AES-128 encryption to make the protocol more efficient
  • Use gZip to optimize packet size
  • Solved the placeholder issue
  • Solved the problem that part of the text could cause panic (slice subscript offset)
  • Provide a non-intrusive and safer key exchange function
  • Key generator (to extract the key from Hash with the idea of ​​reliance)
Header
  • Change the previous map[string]string to map[string][]byte This will allow you to store more types of things in the header, no matter the key of the binary stream or the HMAC, or even a piece of audio and video
  • Allow users to customize the placeholder src/packet/const.go -Advanced coding method, FFAX Protocol v2 uses a lot of human readable content to reduce code redundancy and improve readability
  • Header nesting, RealFax encourages people to dare to innovate, although we do not provide such an operation to implement nested Header, but this type of func may be added in the future
  • struct binding, maybe this can also bind a struct?
Message
  • Message allows you to store various contents, which is different from Header. Although Header can store []byte, we do not recommend storing some content in Header
  • This version of FFAX Protocol allows Message to store more bytes. You can implement oversized files, oversized audio and video streams, and VOIP audio and video calls here
🚫Signature
  • We have removed Signature from the FFAX Protocol in this version, because it is unnecessary and will increase your system burden/risk -New solution: You can store Signature in Header, Header allows you to confuse Key
👎shortcoming
  • Binary linear storage (in large data packet scenarios will cause performance degradation), the solution: cut the content into several equal parts, set the current Message hash, timestamp, Index, Next packet in the Header hash
  • Original decoding method (array cutting)
✨Personalization
🔣Placeholder

We allow you to modify the placeholders in the data packet. The placeholders are defined in src/packet/const.go, you can see three hexadecimal placeholder constants

  • global int64 = 0xFFAACC01
  • header int64 = 0xFFABCC02
  • kv int64 = 0xFFACCC03
    Of course, we do not recommend that you modify these default values. If you need to modify these for some reason, we recommend that you follow the following standards
  • Hexadecimal string starting with 0x
  • The minimum length is 4 digits such as 0xFFFF0
  • Don't reveal your placeholder to others
⚡2.1.0⚡ alpha project
  • Use Intel AES-NI to optimize AES encryption and decryption
  • Use Intel RNG technology to enhance the security of the key
  • Do not use linear storage, use other

Documentation ¶

The Go Gopher

There is no documentation for this package.

Directories ¶

Path Synopsis
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL