HttpProxyServerConfig.java
4.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
package com.github.monkeywie.proxyee.server;
import com.github.monkeywie.proxyee.server.accept.HttpProxyAcceptHandler;
import com.github.monkeywie.proxyee.server.auth.HttpProxyAuthenticationProvider;
import io.netty.channel.EventLoopGroup;
import io.netty.handler.ssl.SslContext;
import io.netty.resolver.AddressResolverGroup;
import io.netty.resolver.DefaultAddressResolverGroup;
import java.net.SocketAddress;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.util.Date;
public class HttpProxyServerConfig {
private SslContext clientSslCtx;
private String issuer;
private Date caNotBefore;
private Date caNotAfter;
private PrivateKey caPriKey;
private PrivateKey serverPriKey;
private PublicKey serverPubKey;
private EventLoopGroup proxyLoopGroup;
private int bossGroupThreads;
private int workerGroupThreads;
private int proxyGroupThreads;
private boolean handleSsl;
private HttpProxyAcceptHandler httpProxyAcceptHandler;
private HttpProxyAuthenticationProvider authenticationProvider;
private final AddressResolverGroup<? extends SocketAddress> resolver;
public HttpProxyServerConfig() {
this(DefaultAddressResolverGroup.INSTANCE);
}
public HttpProxyServerConfig(final AddressResolverGroup<? extends SocketAddress> resolver) {
this.resolver = resolver;
}
public SslContext getClientSslCtx() {
return clientSslCtx;
}
public void setClientSslCtx(SslContext clientSslCtx) {
this.clientSslCtx = clientSslCtx;
}
public String getIssuer() {
return issuer;
}
public void setIssuer(String issuer) {
this.issuer = issuer;
}
public Date getCaNotBefore() {
return caNotBefore;
}
public void setCaNotBefore(Date caNotBefore) {
this.caNotBefore = caNotBefore;
}
public Date getCaNotAfter() {
return caNotAfter;
}
public void setCaNotAfter(Date caNotAfter) {
this.caNotAfter = caNotAfter;
}
public PrivateKey getCaPriKey() {
return caPriKey;
}
public void setCaPriKey(PrivateKey caPriKey) {
this.caPriKey = caPriKey;
}
public PrivateKey getServerPriKey() {
return serverPriKey;
}
public void setServerPriKey(PrivateKey serverPriKey) {
this.serverPriKey = serverPriKey;
}
public PublicKey getServerPubKey() {
return serverPubKey;
}
public void setServerPubKey(PublicKey serverPubKey) {
this.serverPubKey = serverPubKey;
}
public EventLoopGroup getProxyLoopGroup() {
return proxyLoopGroup;
}
public void setProxyLoopGroup(EventLoopGroup proxyLoopGroup) {
this.proxyLoopGroup = proxyLoopGroup;
}
public boolean isHandleSsl() {
return handleSsl;
}
public void setHandleSsl(boolean handleSsl) {
this.handleSsl = handleSsl;
}
public int getBossGroupThreads() {
return bossGroupThreads;
}
public void setBossGroupThreads(int bossGroupThreads) {
this.bossGroupThreads = bossGroupThreads;
}
public int getWorkerGroupThreads() {
return workerGroupThreads;
}
public void setWorkerGroupThreads(int workerGroupThreads) {
this.workerGroupThreads = workerGroupThreads;
}
public int getProxyGroupThreads() {
return proxyGroupThreads;
}
public void setProxyGroupThreads(int proxyGroupThreads) {
this.proxyGroupThreads = proxyGroupThreads;
}
public HttpProxyAcceptHandler getHttpProxyAcceptHandler() {
return httpProxyAcceptHandler;
}
public void setHttpProxyAcceptHandler(final HttpProxyAcceptHandler httpProxyAcceptHandler) {
this.httpProxyAcceptHandler = httpProxyAcceptHandler;
}
public HttpProxyAuthenticationProvider getAuthenticationProvider() {
return authenticationProvider;
}
public void setAuthenticationProvider(final HttpProxyAuthenticationProvider authenticationProvider) {
this.authenticationProvider = authenticationProvider;
}
public AddressResolverGroup<?> resolver() {
return resolver;
}
}