All Projects → CovenantSQL → Gnte

CovenantSQL / Gnte

Licence: apache-2.0
simple Global Network Topology Emulator

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Gnte

Core
Common Open Research Emulator
Stars: ✭ 330 (+21.77%)
Mutual labels:  network, emulator
Mesen S
Mesen-S is a cross-platform (Windows & Linux) SNES emulator built in C++ and C#
Stars: ✭ 267 (-1.48%)
Mutual labels:  emulator
wcecl
Allows to run Windows CE applications on Windows!
Stars: ✭ 54 (-80.07%)
Mutual labels:  emulator
Netshoot
a Docker + Kubernetes network trouble-shooting swiss-army container
Stars: ✭ 3,709 (+1268.63%)
Mutual labels:  network
OldScape
Oldschool Runescape Emulation
Stars: ✭ 30 (-88.93%)
Mutual labels:  emulator
Ovpm
OpenVPN Management Server - Effortless and free OpenVPN server administration
Stars: ✭ 256 (-5.54%)
Mutual labels:  network
l2auth
Lineage 2 C4 server written in C as a learning exercise
Stars: ✭ 31 (-88.56%)
Mutual labels:  emulator
Road To Yuzu Without Switch
This Repo explains how to install the Yuzu Switch Emulator without a Switch
Stars: ✭ 267 (-1.48%)
Mutual labels:  emulator
Invoke Piper
Forward local or remote tcp ports through SMB pipes.
Stars: ✭ 265 (-2.21%)
Mutual labels:  network
Ktnes
A multiplatform NES emulator written in Kotlin
Stars: ✭ 257 (-5.17%)
Mutual labels:  emulator
Networkcaptureself
基于OKHttp的实用抓包小工具,你值得拥有
Stars: ✭ 255 (-5.9%)
Mutual labels:  network
PokemonBattleEngine
A C# library that can emulate Pokémon battles.
Stars: ✭ 92 (-66.05%)
Mutual labels:  emulator
Simpleator
Simpleator ("Simple-ator") is an innovative Windows-centric x64 user-mode application emulator that leverages several new features that were added in Windows 10 Spring Update (1803), also called "Redstone 4", with additional improvements that were made in Windows 10 October Update (1809), aka "Redstone 5".
Stars: ✭ 260 (-4.06%)
Mutual labels:  emulator
speljongen
gameboy emulator written in c++
Stars: ✭ 15 (-94.46%)
Mutual labels:  emulator
Embeddedsystem
📚 嵌入式系统基础知识与主流编程语言相关内容总结
Stars: ✭ 266 (-1.85%)
Mutual labels:  network
QEMU-Manager
macOS graphical frontend to QEMU
Stars: ✭ 175 (-35.42%)
Mutual labels:  emulator
Riscv Rust
RISC-V processor emulator written in Rust+WASM
Stars: ✭ 253 (-6.64%)
Mutual labels:  emulator
Chip8
🎮 ‎ A Chip-8 emulator written in JavaScript for web, CLI, and native UI
Stars: ✭ 258 (-4.8%)
Mutual labels:  emulator
Blacknet
Free advanced and modern Windows botnet with a nice and secure PHP panel.
Stars: ✭ 271 (+0%)
Mutual labels:  network
Webmsx
WebMSX - Online MSX Emulator
Stars: ✭ 269 (-0.74%)
Mutual labels:  emulator

GNTE

GNTE(Global Network Topology Emulator) is a docker-based all-in-one unstable global network emulator. It emulates functionality such as random delay and packet loss.

Before Use

Install docker

Build and Run

1. build docker image

Clone this repo and run build.sh. There should be an image named ns in your docker environment.

2. modify network definition file

Edit example.yaml to fit your requirements. The rules of this file are described in the bottom section.

3. generate and launch network emulator

Run the following command:

./generate.sh

Once all CovenantSQL testnet dockers are running, you can use docker ps -a to see all container nodes:

You can also find a graph of the network in graph.png under your root folder:

4. stop random one node or all nodes

Run the following command:

./generate.sh stopone filter

will stop randon one node. If filter is not empty, it will stop node name contains filter.

And there is also a command to stop all:

./generate.sh stopall filter

Also a command for restart all stopped nodes:

./generate.sh startall

5. run your own program in testnet

Containers are referenced by group_name+ip. For example, given containers 10.250.1.2 and 10.250.8.2, you can run docker exec -it china10.250.1.2 ping 10.250.8.2 to test the connection between these two networks.

You can replace the cmd in the group section of yaml to run your own command. The scripts dir will be "volumed" to containers. docker run --rm -it -v $DIR/scripts:/scripts you can put your own binaries or scripts here and put your self defined scripts/my.yaml:

group:
  - 
    name: china
    nodes:
      - 
        ip: 10.250.1.2
        cmd: "cd /scripts && ./YourBin args"
      - 
        ip: 10.250.1.3
        cmd: "cd /scripts && ./YourBin args"
    delay: "100ms 10ms 30%"
    loss: "1% 10%"
  - 
    name: us
    nodes:
      - 
        ip: 10.250.2.2
        cmd: "cd /scripts && ./YourBin args"
      - 
        ip: 10.250.2.3
        cmd: "cd /scripts && ./YourBin args"
    delay: "1000ms 10ms 30%"
    loss: "1% 10%"
    
network:
  -
    groups:
      - china
      - us
    delay: "200ms 10ms 1%"
    corrupt: "0.2%"
    rate: "10mbit"

and run

./generate.sh scripts/my.yaml

5. [optional] clean network

Run ./scripts/clean.sh

Modify Network Definition

A sample network description is provided in example.yaml, which you can edit directly.

sample

# Only support 10.250.0.2 ~ 10.250.254.254
group:
  -
    name: china
    nodes:
      -
        ip: 10.250.1.2/32
        cmd: "ping -c3 g.cn"
      -
        ip: 10.250.2.2/32
        cmd: "ping -c3 g.cn"
      -
        ip: 10.250.3.2/32
        cmd: "ping -c3 g.cn"
      -
        ip: 10.250.4.2/32
        cmd: "ping -c3 g.cn"
    delay: "100ms 10ms 30%"
    loss: "1% 10%"
  -
    name: eu
    nodes:
      -
        ip: 10.250.5.2/32
        cmd: "ping -c3 g.cn"
      -
        ip: 10.250.6.2/32
        cmd: "ping -c3 g.cn"
      -
        ip: 10.250.7.2/32
        cmd: "ping -c3 g.cn"
    delay: "10ms 5ms 30%"
    loss: "1% 10%"
  -
    name: jpn
    nodes:
      -
        ip: 10.250.8.2/32
        cmd: "ping -c3 g.cn"
      -
        ip: 10.250.9.2/32
        cmd: "ping -c3 g.cn"
    delay: "100ms 10ms 30%"
    duplicate: "1%"
    rate: "100mbit"

network:
  -
    groups:
      - china
      - eu
    delay: "200ms 10ms 1%"
    corrupt: "0.2%"
    rate: "10mbit"

  -
    groups:
      - china
      - jpn
    delay: "100ms 10ms 1%"
    rate: "10mbit"

  -
    groups:
      - jpn
      - eu
    delay: "30ms 5ms 1%"
    rate: "100mbit"

Description

The network definition contains two sections: group and network. Group defines ips and describes network info between them. Network describes network info between groups.

group

  • name: unique name of the group

  • nodes: list of node in the network.

node

  • ip: Node IP must be between "10.250.0.2 ~ 10.250.254.254" and written in CIDR format, eg. 10.250.1.2/32.

  • cmd: Node command to run. Blocking or Non-blocking are both ok.

  • network params: The following 6 tc network limit parameters are supported:

    delay
    loss
    duplicate
    corrupt
    reorder
    rate
    

The values of these parameters are exactly like those of the tc command.

  • delay: "100ms 10ms 30%" means 100ms delay in network and 30% packets +-10ms.
  • duplicate: "1%" means 1% packets is duplicated.
  • rate: "100mbit" means network transmit rate is 100mbit.
  • corrupt: "0.2%" means 0.2% packets are randomly modified.

network

  • groups: list of group names

  • network params: same as group

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].