Skip to content

Commit 34be745

Browse files
committed
Initial testing with new virtual desktop
1 parent 3944c18 commit 34be745

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

helm/wrongsecrets-ctf-party/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ virtualdesktop:
200200
maxInstances: 500
201201
# -- Juice Shop Image to use
202202
image: jeroenwillemsen/wrongsecrets-desktop-k8s
203-
tag: 1.6.0
203+
tag: up3
204204
repository: commjoenie/wrongSecrets
205205
resources:
206206
request:

wrongsecrets-balancer/src/proxy/proxy.js

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,13 @@ function proxyTrafficToJuiceShop(req, res) {
128128
req.path === '/files/socket.io/socket.io.js' ||
129129
req.path === '/js/vendor/jquery.min.js' ||
130130
req.path === '/files/socket.io/' ||
131-
req.path === '/files/socket.io/socket.io.js.map'
131+
req.path === '/files/socket.io/socket.io.js.map' ||
132+
req.path === '/public/css/filebrowser.css' ||
133+
req.path === '/public/js/filebrowser.js' ||
134+
req.path === '/public/js/jquery.min.js' ||
135+
req.path === '/vnc/vendor/interact.min.js.map' ||
136+
req.path.includes('vnc') ||
137+
req.path.includes('audio/socket.io')
132138
) {
133139
target = {
134140
target: `http://${teamname}-virtualdesktop.${teamname}.svc:8080`,
@@ -140,11 +146,18 @@ function proxyTrafficToJuiceShop(req, res) {
140146
ws: true,
141147
};
142148
}
143-
logger.info(`we got ${teamname} requesting ${target.target}`);
149+
logger.info(`we got ${teamname} requesting ${target.target} for ${req.path}`);
144150

145-
if (req.path === '/guaclite') {
151+
if (
152+
req.path === '/guaclite' ||
153+
req.path === '/websockify' ||
154+
req.path === '/audio/socket.io/' ||
155+
req.path === '/files/socket.io/'
156+
) {
146157
let server = res.socket.server;
147-
logger.info('putting ws through for /quaclite');
158+
logger.info(
159+
'putting ws through for /quaclite or /websockify or /audio/socket.io/ or /files/socket.io/'
160+
);
148161
server.on('upgrade', function (req, socket, head) {
149162
cookieParser(get('cookieParser.secret'))(req, null, () => {});
150163

0 commit comments

Comments
 (0)