From dec817d8a001b210c49e2f3ea0f2466a5e41e44b Mon Sep 17 00:00:00 2001 From: HF Date: Fri, 5 Feb 2021 00:29:47 +0100 Subject: [PATCH] add ecosystem for captchas --- deployment/example-ecosystem-captchas.yml | 8 + i18n/template-ssr.pot | 48 +-- i18n/template.pot | 471 +++++++++++----------- scripts/copy.js | 4 + src/captchaserver.js | 26 +- src/core/config.js | 1 + src/utils/ip.js | 10 +- src/web.js | 2 +- webpack.config.web.babel.js | 1 + 9 files changed, 298 insertions(+), 273 deletions(-) create mode 100644 deployment/example-ecosystem-captchas.yml diff --git a/deployment/example-ecosystem-captchas.yml b/deployment/example-ecosystem-captchas.yml new file mode 100644 index 0000000..107fd8b --- /dev/null +++ b/deployment/example-ecosystem-captchas.yml @@ -0,0 +1,8 @@ +apps: + - script : ./captchaserver.js + name : 'captchas' + node_args: --nouse-idle-notification --expose-gc + env: + PORT: 80 + HOST: "localhost" + REDIS_URL: 'redis://localhost:6379' diff --git a/i18n/template-ssr.pot b/i18n/template-ssr.pot index 2e7c59a..be7cda7 100644 --- a/i18n/template-ssr.pot +++ b/i18n/template-ssr.pot @@ -57,11 +57,11 @@ msgstr "" msgid "Stop flooding." msgstr "" -#: src/ssr-components/Main.jsx:53 +#: src/ssr-components/Main.jsx:72 msgid "PixelPlanet.fun" msgstr "" -#: src/ssr-components/Main.jsx:55 +#: src/ssr-components/Main.jsx:74 msgid "Place color pixels on an map styled canvas with other players online" msgstr "" @@ -81,31 +81,31 @@ msgstr "" msgid "A 3D globe of our whole map" msgstr "" -#: src/routes/reset_password.js:65 +#: src/routes/reset_password.js:58 msgid "You sent an empty password or invalid data :(" msgstr "" -#: src/routes/reset_password.js:77 +#: src/routes/reset_password.js:70 msgid "This password-reset link isn't valid anymore :(" msgstr "" -#: src/routes/reset_password.js:88 +#: src/routes/reset_password.js:81 msgid "Your passwords do not match :(" msgstr "" -#: src/routes/reset_password.js:103 +#: src/routes/reset_password.js:96 msgid "User doesn't exist in our database :(" msgstr "" -#: src/routes/reset_password.js:115 +#: src/routes/reset_password.js:108 msgid "Passowrd successfully changed." msgstr "" -#: src/routes/reset_password.js:134 +#: src/routes/reset_password.js:127 msgid "Invalid url :( Please check your mail again." msgstr "" -#: src/routes/reset_password.js:147 +#: src/routes/reset_password.js:140 msgid "" "This passwort reset link is wrong or already expired, please request a new " "one (Note: you can use those links just once)" @@ -290,8 +290,19 @@ msgstr "" msgid "Incorrect password!" msgstr "" -#: src/routes/api/auth/logout.js:13 -msgid "You are not even logged in." +#: src/routes/api/auth/verify.js:25 +#: src/routes/api/auth/verify.js:32 +msgid "Mail verification" +msgstr "" + +#: src/routes/api/auth/verify.js:26 +msgid "You are now verified :)" +msgstr "" + +#: src/routes/api/auth/verify.js:32 +msgid "" +"Your mail verification code is invalid or already expired :(, please " +"request a new one." msgstr "" #: src/routes/api/auth/register.js:31 @@ -310,19 +321,8 @@ msgstr "" msgid "Failed to establish session after register :(" msgstr "" -#: src/routes/api/auth/verify.js:25 -#: src/routes/api/auth/verify.js:32 -msgid "Mail verification" -msgstr "" - -#: src/routes/api/auth/verify.js:26 -msgid "You are now verified :)" -msgstr "" - -#: src/routes/api/auth/verify.js:32 -msgid "" -"Your mail verification code is invalid or already expired :(, please " -"request a new one." +#: src/routes/api/auth/logout.js:13 +msgid "You are not even logged in." msgstr "" #: src/ssr-components/RedirectionPage.jsx:20 diff --git a/i18n/template.pot b/i18n/template.pot index 5b3f5d7..298cc33 100644 --- a/i18n/template.pot +++ b/i18n/template.pot @@ -126,80 +126,14 @@ msgstr "" msgid "Pixels placed" msgstr "" -#: src/components/CanvasSelectModal.jsx:67 -#: src/components/CanvasSwitchButton.jsx:20 -msgid "Canvas Selection" -msgstr "" - #: src/components/Converter.jsx:609 #: src/components/CoordinatesBox.jsx:26 msgid "Copy to Clipboard" msgstr "" -#: src/components/ChannelContextMenu.jsx:73 -msgid "Mute" -msgstr "" - -#: src/components/UserContextMenu.jsx:72 -msgid "Ping" -msgstr "" - -#: src/components/UserContextMenu.jsx:97 -msgid "DM" -msgstr "" - -#: src/components/UserContextMenu.jsx:107 -msgid "Block" -msgstr "" - -#: src/components/PalselButton.jsx:25 -msgid "Close Palette" -msgstr "" - -#: src/components/PalselButton.jsx:25 -msgid "Open Palette" -msgstr "" - -#: src/components/GlobeButton.jsx:31 -msgid "Globe View" -msgstr "" - -#: src/components/SettingsButton.jsx:20 -#: src/components/SettingsModal.jsx:267 -msgid "Settings" -msgstr "" - -#: src/components/LogInButton.jsx:20 -#: src/components/UserAreaModal.jsx:160 -msgid "User Area" -msgstr "" - -#: src/components/HelpButton.jsx:20 -msgid "Help" -msgstr "" - -#: src/components/DownloadButton.jsx:37 -msgid "Make Screenshot" -msgstr "" - -#: src/components/Chat.jsx:143 -msgid "Channel settings" -msgstr "" - -#: src/components/Chat.jsx:152 -msgid "maximize" -msgstr "" - -#: src/components/Chat.jsx:168 -msgid "Start chatting here" -msgstr "" - -#: src/components/Chat.jsx:200 -msgid "Chat here" -msgstr "" - -#: src/components/Chat.jsx:220 -msgid "You must be logged in to chat" +#: src/components/CanvasSelectModal.jsx:67 +#: src/components/CanvasSwitchButton.jsx:20 +msgid "Canvas Selection" msgstr "" #: src/components/ForgotPasswordModal.jsx:16 @@ -216,6 +150,10 @@ msgstr "" msgid "Restore my Password" msgstr "" +#: src/components/ChatModal.jsx:35 +msgid "Chat" +msgstr "" + #: src/components/ArchiveModal.jsx:20 msgid "" "While we tend to not delete canvases, some canvases are started for fun or " @@ -253,18 +191,6 @@ msgstr "" msgid "Canvas Archive" msgstr "" -#: src/components/ChatModal.jsx:35 -msgid "Chat" -msgstr "" - -#: src/components/RegisterModal.jsx:18 -msgid "Register new account here" -msgstr "" - -#: src/components/RegisterModal.jsx:38 -msgid "Register New Account" -msgstr "" - #: src/components/CanvasSelectModal.jsx:29 msgid "" "Select the canvas you want to use. Every canvas is unique and has different " @@ -324,6 +250,111 @@ msgstr "" msgid "Loading..." msgstr "" +#: src/components/LogInButton.jsx:20 +#: src/components/UserAreaModal.jsx:160 +msgid "User Area" +msgstr "" + +#: src/components/RegisterModal.jsx:18 +msgid "Register new account here" +msgstr "" + +#: src/components/RegisterModal.jsx:38 +msgid "Register New Account" +msgstr "" + +#: src/components/SettingsModal.jsx:125 +msgid "Show Grid" +msgstr "" + +#: src/components/SettingsModal.jsx:126 +msgid "Turn on grid to highlight pixel borders." +msgstr "" + +#: src/components/SettingsModal.jsx:132 +msgid "Show Pixel Activity" +msgstr "" + +#: src/components/SettingsModal.jsx:133 +msgid "Show circles where pixels are placed." +msgstr "" + +#: src/components/SettingsModal.jsx:139 +msgid "Disable Game Sounds" +msgstr "" + +#: src/components/SettingsModal.jsx:141 +msgid "All sound effects will be disabled." +msgstr "" + +#: src/components/SettingsModal.jsx:147 +msgid "Enable chat notifications" +msgstr "" + +#: src/components/SettingsModal.jsx:148 +msgid "Play a sound when new chat messages arrive" +msgstr "" + +#: src/components/SettingsModal.jsx:153 +msgid "Auto Zoom In" +msgstr "" + +#: src/components/SettingsModal.jsx:155 +msgid "" +"Zoom in instead of placing a pixel when you tap the canvas and your zoom is " +"small." +msgstr "" + +#: src/components/SettingsModal.jsx:160 +msgid "Compact Palette" +msgstr "" + +#: src/components/SettingsModal.jsx:162 +msgid "Display Palette in a compact form that takes less screen space." +msgstr "" + +#: src/components/SettingsModal.jsx:167 +msgid "Potato Mode" +msgstr "" + +#: src/components/SettingsModal.jsx:168 +msgid "For when you are playing on a potato." +msgstr "" + +#: src/components/Converter.jsx:423 +#: src/components/SettingsModal.jsx:173 +msgid "Light Grid" +msgstr "" + +#: src/components/SettingsModal.jsx:174 +msgid "Show Grid in white instead of black." +msgstr "" + +#: src/components/SettingsModal.jsx:180 +msgid "Historical View" +msgstr "" + +#: src/components/SettingsModal.jsx:181 +msgid "Check out past versions of the canvas." +msgstr "" + +#: src/components/SettingsModal.jsx:189 +msgid "Themes" +msgstr "" + +#: src/components/SettingsModal.jsx:190 +msgid "How pixelplanet should look like." +msgstr "" + +#: src/components/SettingsModal.jsx:200 +msgid "Select Language" +msgstr "" + +#: src/components/SettingsButton.jsx:20 +#: src/components/SettingsModal.jsx:278 +msgid "Settings" +msgstr "" + #: src/components/HelpModal.jsx:34 #: src/components/HelpModal.jsx:35 msgid "Privacy Policy" @@ -517,140 +548,60 @@ msgstr "" msgid "Welcome to PixelPlanet.fun" msgstr "" -#: src/components/SettingsModal.jsx:123 -msgid "Show Grid" +#: src/components/UserContextMenu.jsx:72 +msgid "Ping" msgstr "" -#: src/components/SettingsModal.jsx:124 -msgid "Turn on grid to highlight pixel borders." +#: src/components/UserContextMenu.jsx:97 +msgid "DM" msgstr "" -#: src/components/SettingsModal.jsx:130 -msgid "Show Pixel Activity" +#: src/components/UserContextMenu.jsx:107 +msgid "Block" msgstr "" -#: src/components/SettingsModal.jsx:131 -msgid "Show circles where pixels are placed." +#: src/components/ChannelContextMenu.jsx:73 +msgid "Mute" msgstr "" -#: src/components/SettingsModal.jsx:137 -msgid "Disable Game Sounds" +#: src/components/PalselButton.jsx:25 +msgid "Close Palette" msgstr "" -#: src/components/SettingsModal.jsx:139 -msgid "All sound effects will be disabled." +#: src/components/PalselButton.jsx:25 +msgid "Open Palette" msgstr "" -#: src/components/SettingsModal.jsx:145 -msgid "Enable chat notifications" +#: src/components/GlobeButton.jsx:31 +msgid "Globe View" msgstr "" -#: src/components/SettingsModal.jsx:146 -msgid "Play a sound when new chat messages arrive" +#: src/components/Chat.jsx:143 +msgid "Channel settings" msgstr "" -#: src/components/SettingsModal.jsx:151 -msgid "Auto Zoom In" +#: src/components/Chat.jsx:152 +msgid "maximize" msgstr "" -#: src/components/SettingsModal.jsx:153 -msgid "" -"Zoom in instead of placing a pixel when you tap the canvas and your zoom is " -"small." +#: src/components/Chat.jsx:168 +msgid "Start chatting here" msgstr "" -#: src/components/SettingsModal.jsx:158 -msgid "Compact Palette" +#: src/components/Chat.jsx:200 +msgid "Chat here" msgstr "" -#: src/components/SettingsModal.jsx:160 -msgid "Display Palette in a compact form that takes less screen space." +#: src/components/Chat.jsx:220 +msgid "You must be logged in to chat" msgstr "" -#: src/components/SettingsModal.jsx:165 -msgid "Potato Mode" +#: src/components/DownloadButton.jsx:37 +msgid "Make Screenshot" msgstr "" -#: src/components/SettingsModal.jsx:166 -msgid "For when you are playing on a potato." -msgstr "" - -#: src/components/Converter.jsx:423 -#: src/components/SettingsModal.jsx:171 -msgid "Light Grid" -msgstr "" - -#: src/components/SettingsModal.jsx:172 -msgid "Show Grid in white instead of black." -msgstr "" - -#: src/components/SettingsModal.jsx:179 -msgid "Historical View" -msgstr "" - -#: src/components/SettingsModal.jsx:180 -msgid "Check out past versions of the canvas." -msgstr "" - -#: src/components/SettingsModal.jsx:188 -msgid "Themes" -msgstr "" - -#: src/components/SettingsModal.jsx:189 -msgid "How pixelplanet should look like." -msgstr "" - -#: src/components/ChangeMail.jsx:104 -#: src/components/ChangeName.jsx:82 -#: src/components/ChangePassword.jsx:120 -#: src/components/DeleteAccount.jsx:82 -#: src/components/LogInForm.jsx:97 -#: src/components/NewPasswordForm.jsx:93 -#: src/components/SignUpForm.jsx:118 -msgid "Error" -msgstr "" - -#: src/components/SignUpForm.jsx:126 -msgid "Name" -msgstr "" - -#: src/components/NewPasswordForm.jsx:100 -#: src/components/SignUpForm.jsx:133 -msgid "Email" -msgstr "" - -#: src/components/ChangeMail.jsx:112 -#: src/components/DeleteAccount.jsx:89 -#: src/components/LogInForm.jsx:111 -#: src/components/SignUpForm.jsx:140 -msgid "Password" -msgstr "" - -#: src/components/SignUpForm.jsx:149 -msgid "Confirm Password" -msgstr "" - -#: src/components/Admintools.jsx:306 -#: src/components/Admintools.jsx:387 -#: src/components/Admintools.jsx:461 -#: src/components/Admintools.jsx:505 -#: src/components/Admintools.jsx:589 -#: src/components/NewPasswordForm.jsx:104 -#: src/components/SignUpForm.jsx:152 -msgid "Submit" -msgstr "" - -#: src/components/ChangeMail.jsx:125 -#: src/components/ChangeName.jsx:94 -#: src/components/ChangePassword.jsx:152 -#: src/components/DeleteAccount.jsx:95 -#: src/components/NewPasswordForm.jsx:106 -#: src/components/SignUpForm.jsx:158 -msgid "Cancel" -msgstr "" - -#: src/components/NewPasswordForm.jsx:83 -msgid "Sent you a mail with instructions to reset your password." +#: src/components/HelpButton.jsx:20 +msgid "Help" msgstr "" #: src/components/CanvasItem.jsx:46 @@ -694,14 +645,6 @@ msgstr "" msgid "Ranking updates every 5 min. Daily rankings get reset at midnight UTC." msgstr "" -#: src/components/LogInForm.jsx:104 -msgid "Name or Email" -msgstr "" - -#: src/components/LogInForm.jsx:115 -msgid "LogIn" -msgstr "" - #: src/components/UserArea.jsx:57 msgid "Todays Placed Pixels" msgstr "" @@ -747,6 +690,70 @@ msgstr "" msgid "Social Settings" msgstr "" +#: src/components/ChangeMail.jsx:104 +#: src/components/ChangeName.jsx:82 +#: src/components/ChangePassword.jsx:120 +#: src/components/DeleteAccount.jsx:82 +#: src/components/LogInForm.jsx:97 +#: src/components/NewPasswordForm.jsx:93 +#: src/components/SignUpForm.jsx:118 +msgid "Error" +msgstr "" + +#: src/components/LogInForm.jsx:104 +msgid "Name or Email" +msgstr "" + +#: src/components/ChangeMail.jsx:112 +#: src/components/DeleteAccount.jsx:89 +#: src/components/LogInForm.jsx:111 +#: src/components/SignUpForm.jsx:140 +msgid "Password" +msgstr "" + +#: src/components/LogInForm.jsx:115 +msgid "LogIn" +msgstr "" + +#: src/components/SignUpForm.jsx:126 +msgid "Name" +msgstr "" + +#: src/components/NewPasswordForm.jsx:100 +#: src/components/SignUpForm.jsx:133 +msgid "Email" +msgstr "" + +#: src/components/SignUpForm.jsx:149 +msgid "Confirm Password" +msgstr "" + +#: src/components/Admintools.jsx:306 +#: src/components/Admintools.jsx:387 +#: src/components/Admintools.jsx:461 +#: src/components/Admintools.jsx:505 +#: src/components/Admintools.jsx:589 +#: src/components/NewPasswordForm.jsx:104 +#: src/components/SignUpForm.jsx:152 +msgid "Submit" +msgstr "" + +#: src/components/ChangeMail.jsx:125 +#: src/components/ChangeName.jsx:94 +#: src/components/ChangePassword.jsx:152 +#: src/components/DeleteAccount.jsx:95 +#: src/components/NewPasswordForm.jsx:106 +#: src/components/SignUpForm.jsx:158 +msgid "Cancel" +msgstr "" + +#: src/components/ChangeMail.jsx:123 +#: src/components/ChangeName.jsx:92 +#: src/components/ChangePassword.jsx:150 +#: src/components/LanguageSelect.jsx:73 +msgid "Save" +msgstr "" + #: src/components/Admintools.jsx:179 msgid "Build image on canvas." msgstr "" @@ -825,6 +832,10 @@ msgstr "" msgid "User Name" msgstr "" +#: src/components/NewPasswordForm.jsx:83 +msgid "Sent you a mail with instructions to reset your password." +msgstr "" + #: src/components/Converter.jsx:274 msgid "Choose Canvas" msgstr "" @@ -964,10 +975,6 @@ msgstr "" msgid "You have no users blocked" msgstr "" -#: src/components/DeleteAccount.jsx:93 -msgid "Yes, Delete My Account!" -msgstr "" - #: src/components/ChangeMail.jsx:89 msgid "" "Changed Mail successfully. We sent you a verification mail, " @@ -978,36 +985,14 @@ msgstr "" msgid "New Mail" msgstr "" -#: src/components/ChangeMail.jsx:123 -#: src/components/ChangeName.jsx:92 -#: src/components/ChangePassword.jsx:150 -msgid "Save" +#: src/components/DeleteAccount.jsx:93 +msgid "Yes, Delete My Account!" msgstr "" #: src/components/ChangeName.jsx:88 msgid "New Username" msgstr "" -#: src/components/ChangePassword.jsx:18 -msgid "Passwords do not match." -msgstr "" - -#: src/components/ChangePassword.jsx:103 -msgid "Changed Password successfully." -msgstr "" - -#: src/components/ChangePassword.jsx:129 -msgid "Old Password" -msgstr "" - -#: src/components/ChangePassword.jsx:137 -msgid "New Password" -msgstr "" - -#: src/components/ChangePassword.jsx:146 -msgid "Confirm New Password" -msgstr "" - #: src/components/UserMessages.jsx:41 msgid "A new verification mail is getting sent to you." msgstr "" @@ -1043,20 +1028,45 @@ msgstr "" msgid "Deny" msgstr "" +#: src/components/ChangePassword.jsx:18 +msgid "Passwords do not match." +msgstr "" + +#: src/components/ChangePassword.jsx:103 +msgid "Changed Password successfully." +msgstr "" + +#: src/components/ChangePassword.jsx:129 +msgid "Old Password" +msgstr "" + +#: src/components/ChangePassword.jsx:137 +msgid "New Password" +msgstr "" + +#: src/components/ChangePassword.jsx:146 +msgid "Confirm New Password" +msgstr "" + #: src/components/HelpModal.jsx:15 -#: src/components/SettingsModal.jsx:125 +#: src/components/SettingsModal.jsx:127 msgctxt "keybinds" msgid "G" msgstr "" #: src/components/HelpModal.jsx:16 -#: src/components/SettingsModal.jsx:132 +#: src/components/SettingsModal.jsx:134 msgctxt "keybinds" msgid "X" msgstr "" +#: src/components/SettingsModal.jsx:142 +msgctxt "keybinds" +msgid "M" +msgstr "" + #: src/components/HelpModal.jsx:17 -#: src/components/SettingsModal.jsx:182 +#: src/components/SettingsModal.jsx:183 msgctxt "keybinds" msgid "H" msgstr "" @@ -1104,9 +1114,4 @@ msgstr "" #: src/components/HelpModal.jsx:32 msgctxt "keybinds" msgid "C" -msgstr "" - -#: src/components/SettingsModal.jsx:140 -msgctxt "keybinds" -msgid "M" msgstr "" \ No newline at end of file diff --git a/scripts/copy.js b/scripts/copy.js index 3e2b01f..9617a75 100644 --- a/scripts/copy.js +++ b/scripts/copy.js @@ -92,6 +92,10 @@ async function copy() { `${deploydir}/example-ecosystem-backup.yml`, `${builddir}/ecosystem-backup.example.yml`, ), + copyFile( + `${deploydir}/example-ecosystem-captchas.yml`, + `${builddir}/ecosystem-captchas.example.yml`, + ), ]); } diff --git a/src/captchaserver.js b/src/captchaserver.js index 3fb970e..5ba5a45 100644 --- a/src/captchaserver.js +++ b/src/captchaserver.js @@ -2,20 +2,26 @@ * serving captchas */ +/* eslint-disable no-console */ + import process from 'process'; -import http from 'http'; +import http from 'http'; import ppfunCaptcha from 'ppfun-captcha'; -/* -const [ - PORT, - REDIS_URL, -] = process.argv.slice(2); -*/ -const PORT = 7000; +const PORT = process.env.PORT || 80; +const HOST = process.env.HOST || 'localhost'; const server = http.createServer((req, res) => { - const captcha = ppfunCaptcha.create(); + const captcha = ppfunCaptcha.create({ + width: 700, + height: 500, + fontSize: 600, + stroke: 'black', + fill: 'none', + background: 'white', + nodeDeviation: 0.5, + connectionPathDeviation: 0.3, + }); const ip = req.headers['x-real-ip'] || req.connection.remoteAddress; console.log(`Serving ${captcha.text} to ${ip}`); res.writeHead(200, { @@ -26,6 +32,6 @@ const server = http.createServer((req, res) => { res.end(); }); -server.listen(PORT, () => { +server.listen(PORT, HOST, () => { console.log(`Captcha Server listening on port ${PORT}`); }); diff --git a/src/core/config.js b/src/core/config.js index 1160bf3..b807ac6 100644 --- a/src/core/config.js +++ b/src/core/config.js @@ -10,6 +10,7 @@ if (process.env.BROWSER) { } export const PORT = process.env.PORT || 80; +export const HOST = process.env.HOST || 'localhost'; export const GMAIL_USER = process.env.GMAIL_USER || null; export const GMAIL_PW = process.env.GMAIL_PW || null; diff --git a/src/utils/ip.js b/src/utils/ip.js index 236bb29..2226e1f 100644 --- a/src/utils/ip.js +++ b/src/utils/ip.js @@ -17,7 +17,6 @@ export function getHostFromRequest(req): ?string { } export function getIPFromRequest(req): ?string { - if (USE_XREALIP) { const ip = req.headers['x-real-ip']; if (ip) { @@ -30,10 +29,11 @@ export function getIPFromRequest(req): ?string { let conip = (connection ? connection.remoteAddress : socket.remoteAddress); conip = conip || '0.0.0.1'; - // eslint-disable-next-line max-len - logger.warn( - `Connection not going through nginx and cloudflare! IP: ${conip}`, headers - ); + if (!USE_XREALIP) { + logger.warn( + `Connection not going through reverse proxy! IP: ${conip}`, reqheaders, + ); + } return conip; } diff --git a/src/web.js b/src/web.js index 055c246..0989df9 100644 --- a/src/web.js +++ b/src/web.js @@ -205,7 +205,7 @@ promise.then(() => { chatProvider.initialize(); const address = server.address(); logger.log( - 'info', + 'info', `web is running at http://${address.host}:${address.port}/`, ); }); diff --git a/webpack.config.web.babel.js b/webpack.config.web.babel.js index cf8a24e..0f4cb6d 100644 --- a/webpack.config.web.babel.js +++ b/webpack.config.web.babel.js @@ -64,6 +64,7 @@ export default ({ entry: { web: [path.resolve(__dirname, 'src', 'web.js')], backup: [path.resolve(__dirname, 'src', 'backup.js')], + captchaserver: [path.resolve(__dirname, 'src', 'captchaserver.js')], }, output: {