proxy_server/prelude/
constants.rs

1#[allow(unused_variables)]
2#[cfg(feature = "chunk_1KB")]
3pub const CHUNK_SIZE: usize = 1024;
4
5#[allow(unused_variables)]
6#[cfg(feature = "chunk_5KB")]
7pub const CHUNK_SIZE: usize = 5_120;
8
9#[allow(unused_variables)]
10#[cfg(feature = "chunk_10KB")]
11pub const CHUNK_SIZE: usize = 10_240;
12
13#[allow(unused_variables)]
14#[cfg(feature = "chunk_50KB")]
15pub const CHUNK_SIZE: usize = 51_200;
16
17#[allow(unused_variables)]
18#[cfg(feature = "chunk_100KB")]
19pub const CHUNK_SIZE: usize = 102_400;
20
21#[allow(unused_variables)]
22#[cfg(feature = "chunk_500KB")]
23pub const CHUNK_SIZE: usize = 512_000;
24
25#[allow(unused_variables)]
26#[cfg(feature = "chunk_1MB")]
27pub const CHUNK_SIZE: usize = 1_024_000;
28
29#[allow(unused_variables)]
30#[cfg(feature = "chunk_5MB")]
31pub const CHUNK_SIZE: usize = 5_120_000;
32
33#[allow(unused_variables)]
34#[cfg(feature = "chunk_10MB")]
35pub const CHUNK_SIZE: usize = 10_240_000;
36
37/// Address of proxy target
38pub const TARGET_ADDRESS: &str = "127.0.0.1:3001";
39
40/// Count of working threads
41pub const THREADS: usize = 4;
42
43/// Proxy server listen address
44pub const PROXY_ADDRESS: &str = "127.0.0.1:3000";
45
46/// Default HTTP version
47pub const HTTP_VERSION_DEFAULT: &str = "HTTP/1.1";
48
49/// Default ttl
50pub const TTL_DEFAULT: u32 = 300;