Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update examples and packages #581

Merged
merged 2 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions g3proxy/examples/benchmark/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---

runtime:
thread_number: 2

worker:
sched_affinity: true

resolver:
- name: default
type: c-ares

escaper:
- name: default
type: direct_fixed
resolver: default
resolve_strategy:
query: Ipv6Only
bind_ip: fdbd:dc09:0:611::91
egress_network_filter:
default: forbid
allow:
- fc00::/7

server: server.d

log: discard

stat:
target:
udp: 127.0.0.1:8125
prefix: g3proxy
emit_duration: 200ms
12 changes: 12 additions & 0 deletions g3proxy/examples/benchmark/server/d/bench.example.net-ec256.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----BEGIN CERTIFICATE-----
MIIBuzCCAWGgAwIBAgIRAOGKjnjNYEH3R9Tr06fKPCswCgYIKoZIzj0EAwIwGTEX
MBUGA1UEAwwOYmVuY2htYXJrIHJvb3QwHhcNMjQxMDI4MDUwMTQ0WhcNMjUxMDI5
MDUwMTQ0WjAcMRowGAYDVQQDDBFiZW5jaC5leGFtcGxlLm5ldDBZMBMGByqGSM49
AgEGCCqGSM49AwEHA0IABIj/CYnPx64YH9qMSoXPs2WLypF2wg3DWpFSb/Dwc0MY
cREPO4fZDYkda4dUHbcDs/u9FE5EoPbv93OTC5uAm8ajgYYwgYMwDgYDVR0PAQH/
BAQDAgOoMBMGA1UdJQQMMAoGCCsGAQUFBwMBMBwGA1UdEQQVMBOCEWJlbmNoLmV4
YW1wbGUubmV0MB0GA1UdDgQWBBRrhyksePKAaKtT4oAxHXrjdD92WjAfBgNVHSME
GDAWgBRB+HOcO6MKG6WTytfT5MCyza+UUzAKBggqhkjOPQQDAgNIADBFAiEAoaa+
CRRTUf6Nlh+HZybwrhvD3xA8VROSwZE0WCiUc8kCICDAhgdcJ0+bPijeLaRzqwIW
5RkFHesxa/Q4GqoVhWVe
-----END CERTIFICATE-----
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgWCc9lXboFSkeGShT
j/numhJrNk14PLjHnHsR9TbAhTehRANCAASI/wmJz8euGB/ajEqFz7Nli8qRdsIN
w1qRUm/w8HNDGHERDzuH2Q2JHWuHVB23A7P7vRRORKD27/dzkwubgJvG
-----END PRIVATE KEY-----
11 changes: 11 additions & 0 deletions g3proxy/examples/benchmark/server/d/http_proxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

name: http_proxy
type: HttpProxy

escaper: default

listen:
address: "[::]:8080"
backlog: 4096
listen_in_worker: true
16 changes: 16 additions & 0 deletions g3proxy/examples/benchmark/server/d/https_proxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---

name: https_proxy
type: HttpProxy

escaper: default

listen:
address: "[::]:9080"
backlog: 4096
listen_in_worker: true

tls_server:
cert_pairs:
certificate: "bench.example.net-ec256.crt"
private_key: "bench.example.net-ec256.key"
10 changes: 10 additions & 0 deletions g3proxy/examples/benchmark/server/d/rootCA.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-----BEGIN CERTIFICATE-----
MIIBczCCARmgAwIBAgIRAK4uO5Mkjo6T5qZX0FMOSC8wCgYIKoZIzj0EAwIwGTEX
MBUGA1UEAwwOYmVuY2htYXJrIHJvb3QwHhcNMjQxMDI4MDUwMTA0WhcNMzQxMDI3
MDUwMTA0WjAZMRcwFQYDVQQDDA5iZW5jaG1hcmsgcm9vdDBZMBMGByqGSM49AgEG
CCqGSM49AwEHA0IABD3k2aw3+hOUePul3MUvnWpDISpHaZi3/DYuKxuuuPGzUxLw
zLqU8/dr14Y5vNiCfq8/b5s1Om+J5/N4kjGjNz+jQjBAMA4GA1UdDwEB/wQEAwIB
BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRB+HOcO6MKG6WTytfT5MCyza+U
UzAKBggqhkjOPQQDAgNIADBFAiAFsc4zlCO563OHPrn6scYCoITGFE/0EqhDYF++
FhWaEwIhAI9gOcuBJsXmPlaG8hJ8JhJXlDhE78LtgH6n11KOSIZu
-----END CERTIFICATE-----
13 changes: 13 additions & 0 deletions g3proxy/examples/benchmark/server/d/tcp_stream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---

name: tcp_stream
type: TcpStream

escaper: default

listen:
address: "[::]:8090"
backlog: 4096
listen_in_worker: true

upstream: "127.0.0.1:80"
18 changes: 18 additions & 0 deletions g3proxy/examples/benchmark/server/d/tls_stream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---

name: tls_stream
type: TlsStream

escaper: default

listen:
address: "[::]:9090"
backlog: 4096
listen_in_worker: true

tls_server:
cert_pairs:
certificate: "bench.example.net-ec256.crt"
private_key: "bench.example.net-ec256.key"

upstream: "127.0.0.1:80"
3 changes: 2 additions & 1 deletion g3tiles/examples/benchmark/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
runtime:
thread_number: 2

worker: {}
worker:
sched_affinity: true

discover:
- name: static
Expand Down
3 changes: 2 additions & 1 deletion g3tiles/examples/benchmark/server.d/openssl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: openssl
type: OpensslProxy
listen:
address: "[::]:9093"
backlog: 4096
listen_in_worker: true

virtual_hosts:
Expand All @@ -16,4 +17,4 @@ virtual_hosts:
backends:
- http

tls-ticketer: {}
tls-ticketer: { }
3 changes: 2 additions & 1 deletion g3tiles/examples/benchmark/server.d/rustls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: rustls
type: RustlsProxy
listen:
address: "[::]:9095"
backlog: 4096
listen_in_worker: true

virtual_hosts:
Expand All @@ -16,4 +17,4 @@ virtual_hosts:
backends:
- http

tls-ticketer: {}
tls-ticketer: { }
Loading