All Projects → wkgcass → Vproxy

wkgcass / Vproxy

Licence: mit
1) proxy: LB,DNS,Socks. 2) k8s: CRD and Controllers. 3) sdn: L3 Stackable Virtual Switch.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Vproxy

Gloo Mesh
The Service Mesh Orchestration Platform
Stars: ✭ 846 (+861.36%)
Mutual labels:  service-mesh
Ijjs
a lightweight js runtime for IOT(一个面向物联网的JS运行时)
Stars: ✭ 38 (-56.82%)
Mutual labels:  kcp
Envoy Control
Envoy Control is a platform-agnostic, production-ready Control Plane for Service Mesh based on Envoy Proxy.
Stars: ✭ 66 (-25%)
Mutual labels:  service-mesh
Istio Demo
demonstrating canary deployments with istio
Stars: ✭ 12 (-86.36%)
Mutual labels:  service-mesh
Awesome Scalability Toolbox
My opinionated list of products and tools used for high-scalability projects
Stars: ✭ 34 (-61.36%)
Mutual labels:  service-mesh
Realtinet
A fast tcp/udp net lib, based on muduo + kcp. 一个快速的tcp/udp网络库, 基于 muduo + kcp .
Stars: ✭ 46 (-47.73%)
Mutual labels:  kcp
Istio Bench
A benchmark tool for Istio. It measures CPU, Memory, Network usage of istio per number of services
Stars: ✭ 20 (-77.27%)
Mutual labels:  service-mesh
Blockerized Dockchain
Because all problems are solvable with containers and blockchains
Stars: ✭ 77 (-12.5%)
Mutual labels:  service-mesh
Old issues repo
Deprecated issue-tracking repo, please post new issues or feature requests to istio/istio instead.
Stars: ✭ 37 (-57.95%)
Mutual labels:  service-mesh
Micro Mesh
gRPC微服务架构实践
Stars: ✭ 50 (-43.18%)
Mutual labels:  service-mesh
Meshery.io
Site for Meshery, the multi-mesh manager
Stars: ✭ 29 (-67.05%)
Mutual labels:  service-mesh
Meshery Linkerd
Meshery adapter for Linkerd
Stars: ✭ 34 (-61.36%)
Mutual labels:  service-mesh
Linkerd2 Proxy
A purpose-built proxy for the Linkerd service mesh. Written in Rust.
Stars: ✭ 1,043 (+1085.23%)
Mutual labels:  service-mesh
Linkerd2
Ultralight, security-first service mesh for Kubernetes. Main repo for Linkerd 2.x.
Stars: ✭ 7,887 (+8862.5%)
Mutual labels:  service-mesh
Kubernetes Handbook
Kubernetes中文指南/云原生应用架构实践手册 - https://jimmysong.io/kubernetes-handbook
Stars: ✭ 9,420 (+10604.55%)
Mutual labels:  service-mesh
Scalecube Services
v2.0 - ScaleCube Services provides a low latency Reactive Microservices library for serverless service registry and discovery based on gossip protocol and without single point-of-failure or bottlenecks.
Stars: ✭ 23 (-73.86%)
Mutual labels:  service-mesh
Learn Istio
⛵️ Istio resources 🕸
Stars: ✭ 1,025 (+1064.77%)
Mutual labels:  service-mesh
Dolphin
Distributed API Gateway
Stars: ✭ 84 (-4.55%)
Mutual labels:  service-mesh
Service Mesh Benchmark
Stars: ✭ 72 (-18.18%)
Mutual labels:  service-mesh
Skywalking Data Collect Protocol
Data Collect Protocols of Apache SkyWalking
Stars: ✭ 49 (-44.32%)
Mutual labels:  service-mesh

vproxy

Build Status

中文文档

Intro

VProxy is a zero-dependency TCP Loadbalancer based on Java NIO. The project only requires Java 11 to run.

Clone it, compile it, then everything is ready for running.

Features

  1. TCP Loadbalancer with TLS termination
  2. HTTP/1.x and HTTP/2 Loadbalancer with Host header consideration
  3. Other tcp based protocol loadbalancer, such as grpc, dubbo
  4. Socks5 server
  5. DNS server and customizable A|AAAA records
  6. Kubernetes integration
  7. Many other standalone extended apps, such as WebSocksProxyAgent and WebSocksProxyServer

Make

use pre-built releases

See the release page.

For linux

Use the latest vproxy-linux binary file in release page.

Or

Use the jlink built runtime here.

For macos

Use the latest vproxy-macos binary file in release page.

For windows

Java runtime can be found here.

For musl

Use the jlink built runtime here.

NOTE: the runtime is in beta state.

pack
./gradlew clean jar
java -jar build/libs/vproxy.jar -Deploy=HelloWorld
jlink
make jlink
./build/image/bin/vproxy -Deploy=HelloWorld
docker
docker build --no-cache -t vproxy:latest https://raw.githubusercontent.com/wkgcass/vproxy/master/docker/Dockerfile
docker run --rm vproxy -Deploy=HelloWorld
graal native-image
./gradlew clean jar
native-image -jar build/libs/vproxy.jar --enable-all-security-services --no-fallback --no-server vproxy
./vproxy -Deploy=HelloWorld
use native fds impl

Only macos(bsd)/linux supported. And you might need to set the JAVA_HOME env variable before compiling.

make vfdposix
java -Dvfd=posix -Djava.library.path=./base/src/main/c -jar build/libs/vproxy.jar -Deploy=HelloWorld

For info about F-Stack, check the doc fstack-how-to.md.

And there's a special version for windows to support Tap devices: -Dvfd=windows, however the normal fds and event loop are stll based on jdk selector channel.

make vfdwindows
java -Dvfd=posix -Djava.library.path=./base/src/main/c -jar build/libs/vproxy.jar -Deploy=HelloWorld
test

Run test cases:

./gradlew runTest

Test vswitch, docker network plugin, vpctl, k8s controller:

# requires virtualbox installed

cd ./misc/auto-setup/
./auto-setup.sh
./auto-verify.sh

Aim

  • Zero dependency: no dependency other than java standard library, and no jni extensions.
  • Simple: keep code simple and clear.
  • Modifiable when running: no need to reload for configuration update.
  • Fast: performance is one of our main priorities.
  • TCP Loadbalancer: we now support TCP and TCP based protocols, also allow your own protocols.
  • Kubernetes: integrate vproxy resources into k8s.

How to use

use vproxy with kubernetes

Add crd, launch vproxy and controller

kubectl apply -f https://github.com/vproxy-tools/vpctl/blob/master/misc/crd.yaml
kubectl apply -f https://github.com/vproxy-tools/vpctl/blob/master/misc/k8s-vproxy.yaml

Launch the example app

kubectl apply -f https://github.com/vproxy-tools/vpctl/blob/master/misc/cr-example.yaml

Detailed info can be found here.

vpctl

A command line client application is provided to manipulate the vproxy instance. You may see more info in vpctl repo.

This tool is fully tested and simple to use. Some examples are provided in the tool repo for reference.

Simple mode

You can start a simple loadbalancer in one command:

java -Deploy=Simple -jar vproxy.jar \  
                bind {port} \
                backend {host1:port1,host2:port2} \
                [ssl {path of cert1,cert2} {path of key} \]
                [protocol {...} \]

Use help to view the parameters.

Standard mode

Use help to view the launching parameters.

When launching the vproxy instance, a http-controller on port 18776 and a resp-controller on port 16309 will be started. Then you can operate the vproxy instance using curl or redis-cli. You may also operate the vproxy instance directly using standard input (stdin).

See command.md and api doc for more info.
Questions about implementation detail are also welcome (in issues).

Doc

Contribute

Currently only I myself is working on this project. I would be very happy if you want to join :)

Thanks to Jetbrains for their great IDEs and the free open source license.

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].