Skip to content

Commit d91118b

Browse files
Added wiki images & SSLv3 conditional support
1 parent c89c10f commit d91118b

17 files changed

Lines changed: 23 additions & 3 deletions

File tree

custom_files/wuproxy_release/jmagicproxy.cfg

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#JMagicProxy Configuration File
2-
#Sun Feb 19 19:20:41 CET 2023
2+
#Tue Aug 29 10:42:30 CEST 2023
33
proxy.ssl.keystoretype=pkcs12
44
proxy.plugins=io.github.explodingbottle.jmagicproxy.implementation.WUProxy;io.github.explodingbottle.jmagicproxy.implementation.BasicProxy
55
proxy.ssl.keystorepass=WindowsUpdate
66
proxy.ssl.warn.algorithms=true
77
proxy.ssl.keystorepath=certs/updks.p12
88
proxy.server.port=8087
99
proxy.logging.logfile=log&$LNUM$.txt
10+
proxy.ssl.enable.sslv3=true
1011
proxy.ssl.sortmode=INCLUDE
12+
proxy.ssl.sortlist=windowsupdate.microsoft.com;*.windowsupdate.microsoft.com;update.microsoft.com;*.update.microsoft.com;*.windowsupdate.com;download.windowsupdate.com;download.microsoft.com;*.download.windowsupdate.com;go.microsoft.com;*.one.microsoft.com
1113
proxy.plugins.wuproxy.redirwuclient=true
12-
proxy.ssl.sortlist=windowsupdate.microsoft.com;*.windowsupdate.microsoft.com;*.update.microsoft.com;*.windowsupdate.com;download.windowsupdate.com;download.microsoft.com;*.download.windowsupdate.com;go.microsoft.com
1314
proxy.plugin.wuproxy.redirectjs=content/redirect.js
1415
proxy.ssl.scan.startingport=9784
1516
proxy.logging.logsfolder=logs

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ This project requires ExplodingAULib for recompiling.
2929
| *proxy.ssl.sortmode* | Represents the sorting mode used to determine if a direct SSL connection must be established or instead if the Proxy must handle it. **NONE** means that every SSL requests will be handled by the proxy. **INCLUDE** means that only listed requests will be handled by the proxy and **EXCLUDE** means that only listed requests will be sent through a tunel directly. |
3030
| *proxy.ssl.sortlist* | A list of requests splited with semi-colons that will be used with the sort mode. \* can be used to mean everything. An example could be \*.google.com;\*.microsoft.com |
3131
| *proxy.plugin.wuproxy.redirwuclient* | A setting specific for WUProxy: Defines if we must simulate an older version of the Windows Update client in order to allow Windows XP to update |
32+
| *proxy.ssl.enable.sslv3* | Chooses to enable support of SSLv3 or not (only applicable if SSL is already enabled). |
3233
3) **Known issues**
3334

3435
- A lot of exceptions can be thrown in the console.

src/io/github/explodingbottle/jmagicproxy/ProxyMain.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ public static void main(String[] args) {
169169
pluginsManager.loadPlugins();
170170
if (propsProvider.getAsBoolean(PropertyKey.PROXY_SSL_ENABLED)) {
171171
mainLogger.log(LoggingLevel.INFO, "SSL is enabled, proceeding to SSL setup.");
172+
if (propsProvider.getAsBoolean(PropertyKey.PROXY_SSL_ENABLE_SSLV3)) {
173+
mainLogger.log(LoggingLevel.INFO, "SSLv3 will be allowed for every SSL connections.");
174+
}
172175
mainLogger.log(LoggingLevel.WARN,
173176
"Please note that every disabled protocols has been enabled again only during the use of this program.");
174177
sslObjectsProvider = new SSLObjectsProvider(

src/io/github/explodingbottle/jmagicproxy/properties/PropertyKey.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public enum PropertyKey {
3939
PROXY_SSL_SORT_MODE("proxy.ssl.sortmode", "NONE", String.class),
4040
PROXY_SSL_SORT_LIST("proxy.ssl.sortlist", "*", String.class),
4141
WUPROXY_REDIRECT_WUCLIENT("proxy.plugins.wuproxy.redirwuclient", false, Boolean.class),
42-
PROXY_SSL_SCAN_STARTING_PORT("proxy.ssl.scan.startingport", 9784, Integer.class);
42+
PROXY_SSL_SCAN_STARTING_PORT("proxy.ssl.scan.startingport", 9784, Integer.class),
43+
PROXY_SSL_ENABLE_SSLV3("proxy.ssl.enable.sslv3", false, Boolean.class);
4344

4445
private String propKey;
4546
private Object defaultVal;

src/io/github/explodingbottle/jmagicproxy/proxy/ssl/SSLCommunicationServer.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,20 @@ public Integer prepareServerSocket() {
116116
try {
117117
server = (SSLServerSocket) obProv.getFactoryServer().createServerSocket(testPort, 0,
118118
InetAddress.getLoopbackAddress());
119+
if (ProxyMain.getPropertiesProvider().getAsBoolean(PropertyKey.PROXY_SSL_ENABLE_SSLV3)) {
120+
boolean canEnableSSLv3 = false;
121+
for (String protocol : server.getSupportedProtocols()) {
122+
if (protocol.equals("SSLv3")) {
123+
canEnableSSLv3 = true;
124+
break;
125+
}
126+
}
127+
if (canEnableSSLv3) {
128+
server.setEnabledProtocols(server.getSupportedProtocols());
129+
} else {
130+
logger.log(LoggingLevel.WARN, "Failed to enable SSLv3 because not a supported protocol.");
131+
}
132+
}
119133
} catch (BindException e) {
120134
testPort++;
121135
} catch (IOException e) {
-17.2 KB
Binary file not shown.
4.57 KB
Loading
20.9 KB
Loading
13.8 KB
Loading
2.98 KB
Loading

0 commit comments

Comments
 (0)