New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow ProxyReverseServers to call a script #105
Comments
Can some other script, outside of Otherwise, with the script approach, |
Not really, I would be afraid of things getting out of sync between the API and the internal SQL/data. If you had an 'exec'-functionality, the options for injecting data would be very powerful. The .sh|.php script could simply implement some cache to prevent DoS against the remote API. |
You might be able to do this sort of thing already, using |
How so? |
Well, I guess
all within the I've not actually tried the above configuration, but...does that make sense? |
It makes sense, but it feels like a bit of a hack. Would it not make sense to have ProxyReverseServers support some kind of flexible backend? Like exec? |
Why does it feel like a hack? An "exec" type functionality is precisely what the |
Because it would depend on the exec not failing, and adding the data to either a .json or SQL entry, and then Would it be possible to expand |
The issue of exec not failing, and failing to add to a file or SQL, are the same either way. Having mod_exec do this, or mod_proxy do this, does not change those potential errors. So that is not a convincing argument. |
What about redis as a ProxyReverseServers-backend? or an entire .json mapped with username => backend (and not a .json per user) - this is why an |
+1 for expanding ProxyReverseServers to more backends - even if not really necessary for exec as it imho barely makes a difference to using ExecBeforeCommand. ldap would be great as this (as far as i figured out) would currently also only be possible with ExecBeforeCommand and there already is mod_ldap that can query directory services. http://www.proftpd.org/docs/contrib/mod_ldap.html#LDAPServer |
In |
I've been experimenting with this over the past few days, since I need to select a backend server based on supplied username. It is correct that Based on the username, my shell script basically writes the backend server to Any suggestions for further steps from here? |
Just an update from my end. I had some issues using I set up a virtual server with an empty I wasn't able to figure out how to prevent If not for these issues, an 'exec:' functionality would be redundant, but due to the workarounds I would +1 'exec:' |
Having the first connect fail is a bad experience, @Castaglia any chance of getting the exec feature added? |
I need to return a certain backend server per user, and I need to get the server from a remote API-call, so i can't make a static file per user, or an SQL call, I need to run something like
ProxyReverseServers exec:/var/ftp/apicall.sh %U
/var/ftp/apicall.sh %U
would then return the list of backend servers in STDOUT, either as JSON or whatever.The text was updated successfully, but these errors were encountered: