muxy: Can not start muxy proxy with a network_shape configuration.
My muxy.config:
proxy:
- name: http_proxy
config:
host: 0.0.0.0
port: 8527
protocol: http
proxy_host: 192.168.8.228
proxy_port: 8527
proxy_protocol: http
- name: tcp_proxy
config:
host: 0.0.0.0 # Local address to bind to and accept connections. May be an IP/hostname
port: 9527 # Local port to bind to
proxy_host: 192.168.8.228 # Proxy server port
proxy_port: 9527 # Proxied server port
nagles_algorithm: true # Use Nagles algorithm?
packet_size: 64 # Size of each contiguous network packet to proxy
middleware:
- name: logger
config:
hex_output: false
- name: delay
config:
request_delay: 2000
response_delay: 1500
- name: network_shape
config:
latency: 1000 # Latency to add in ms
target_bw: 10 # Bandwidth in kbits/s
packet_loss: 0.9 # Packet loss, as a %
target_ips: # Target ipv4 IP addresses/CIDRs
- "0.0.0.0/0"
target_ips6: # Target ipv6 IP addresses
- "::1/128"
target_ports: # Target destination ports
- "9527" # - "1:65535" # Ranges also valid
target_protos: # Target protocols
- "tcp"
- "udp"
- "imp"
command
sudo ./muxy_bin proxy --config muxy_middleware.yml
logs
2018/08/21 10:38:45.999520 [INFO] Loading plugin logger
2018/08/21 10:38:45.999540 [INFO] Loading plugin delay
2018/08/21 10:38:45.999549 [INFO] Loading plugin network_shape
2018/08/21 10:38:45.999706 [INFO] Loading proxy http_proxy
2018/08/21 10:38:45.999733 [INFO] Loading proxy tcp_proxy
2018/08/21 10:38:45.999741 [DEBUG] Delay Symptom - Setup()
2018/08/21 10:38:45.999748 [DEBUG] NetworkShaperSymptom - Setup()
and Muxy process exited.
I viewed the source code, I think that this code will has a panic:
network_shape.go - 62
executeThrottler(&s.config)
how can I solve this problem? thanks.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (8 by maintainers)
Commits related to this issue
- fix(network): prevent exit on network shape errors * Vendor comcast library and modify (remove exits and update print statements to use logger) * Log messages from comcast appropriately to TRACE Se... — committed to mefellows/muxy by mefellows 5 years ago
- fix(network): upgrade Comcast deps to help resolve #23 — committed to mefellows/muxy by mefellows 5 years ago
Oh that’s so cool! I’d love to hear a bit more about it next time we chat. In the meanwhile, I’ll take another look this weekend across the different OS’s. The main change you should see above is that any notices/errors will start to be logged (some always, some others at TRACE level only).
So if it does fail, we’ll at least find out why.
By the way, we’re using muxy at Instructure now. Thanks for yet another excellent testing tool!