You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I (or anyone else) were to start implementing an authentication mode (e.g. user/pass or IP-based), what would be the preferred format (e.g. as a function, as a server.on('') event).
Based on my experience working with repositories such as mscdex/socksv5, I would suggest using either:
Authentication callback to a function (e.g. function(user, pass, ip) { return false/true; }) with a promise, which can be set in the constructor (creating the server). OR
A separate method, used to set authentication (e.g. server.setAuth(function (user, pass, ip) {})).
The text was updated successfully, but these errors were encountered:
If I (or anyone else) were to start implementing an authentication mode (e.g. user/pass or IP-based), what would be the preferred format (e.g. as a function, as a server.on('') event).
Based on my experience working with repositories such as mscdex/socksv5, I would suggest using either:
function(user, pass, ip) { return false/true; }
) with a promise, which can be set in the constructor (creating the server).OR
server.setAuth(function (user, pass, ip) {})
).The text was updated successfully, but these errors were encountered: