Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
bparli committed Mar 11, 2019
1 parent 7393509 commit a39f331
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "convey"
version = "0.2.0"
version = "0.2.1"
authors = ["Ben Parli <[email protected]>"]
edition = "2018"

Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Layer 4 load balancer with dynamic configuration loading featuring proxy, passth

## Usage
```
Convey 0.2.0
Convey 0.2.1
Usage:
convey
Expand All @@ -44,7 +44,7 @@ For passthrough mode we need a couple iptables rules on the convey load balancer
![passthrough](https://docs.google.com/drawings/d/e/2PACX-1vS1umK8iY4EryR0hV4s1lad2r5BrO4_nbFTCua9jqkPP7fSQXodXCZ8XD7kvkfeXxdphtMFczIij-K1/pub?w=581&h=326)

For passthrough mode on the convey load balancer
```
```
sudo iptables -t raw -A PREROUTING -p tcp --dport <LOAD_BALANCER_PORT> -j DROP
sudo iptables -t raw -A PREROUTING -p tcp --sport <BACKEND_SERVER_PORT> --dport 33768:61000 -j DROP
```
Expand Down Expand Up @@ -73,14 +73,14 @@ sudo tc qdisc add dev enp0s8 root handle 10: htb
sudo tc filter add dev enp0s8 parent 10: protocol ip prio 1 u32 match ip src <LOCAL_SERVER_IP> match ip sport <LISTEN_PORT> 0xffff match ip dst <LOAD_BALANCER_IP> action ok
sudo tc filter add dev enp0s8 parent 10: protocol ip prio 10 u32 match ip src <LOCAL_SERVER_IP> match ip sport <LISTEN_PORT> 0xffff action nat egress 192.168.1.117 <LOAD_BALANCER_IP>
```
```

To run
```
sudo ./target/release/convey --dsr --config=sample-passthrough.toml
```

### Proxy
### Proxy
No special setup neccessary

![proxy](https://docs.google.com/drawings/d/e/2PACX-1vQC7fAvVEs0Xb0kcAFfCLIVukhkIrlu-DS_tbrtgpRonmsHO9STpnXvI7NogXiBVUON9gS-L4MLqYV2/pub?w=581&h=326)
Expand All @@ -102,4 +102,3 @@ sudo ~/.cargo/bin/cargo test
<!-- references -->
[tokio]: https://tokio.rs
[Traffic Control]: http://tldp.org/HOWTO/Traffic-Control-HOWTO/index.html

6 changes: 2 additions & 4 deletions src/passthrough/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extern crate lru_time_cache;

use self::backend::{ServerPool, health_checker};
use self::arp::Arp;
use self::lb::{LB, Connection};
use self::lb::{LB};
use self::utils::{find_interface, ETHERNET_HEADER_LEN};

use crate::config::{Config, BaseConfig};
Expand All @@ -18,12 +18,10 @@ use pnet::util::MacAddr;
use pnet::packet::ethernet::{EtherTypes, EthernetPacket, MutableEthernetPacket};
use pnet::packet::arp::{MutableArpPacket, ArpOperations, ArpHardwareTypes};
use pnet::datalink::Channel::Ethernet;
use std::sync::{Arc, Mutex, RwLock};
use std::str::FromStr;
use std::sync::mpsc::{Sender, Receiver};
use std::collections::HashMap;
use std::{thread};
use lru_time_cache::LruCache;
use std::time::Duration;
use crossbeam_channel::unbounded;
use std::sync::mpsc::channel;
Expand Down Expand Up @@ -369,7 +367,7 @@ mod tests {
use std::io::{Read, Write};
use std::{time};
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
use self::passthrough::utils::{EPHEMERAL_PORT_LOWER, EPHEMERAL_PORT_UPPER, build_dummy_ip, build_dummy_eth};
use self::passthrough::utils::{EPHEMERAL_PORT_LOWER, build_dummy_ip, build_dummy_eth};
use self::passthrough::backend::Node;
use self::passthrough::{process_packets, find_interface};
use pnet::packet::tcp::{TcpPacket, MutableTcpPacket};
Expand Down

0 comments on commit a39f331

Please sign in to comment.