Dear Potato,
The idea of achieving form based authentication using socks sounds better but I guess its not possible. We must understand how the underlying protocol works.
Socks is functioning at layer4 while form based authentication at layer7. Again, when implementing socks authentication defined in rfc 1928 (https://datatracker.ietf.org/doc/html/rfc1928) , the acceptable methods defined in protocol are below,
-----------------------------------------------------------------------------------
The values currently defined for METHOD are: o X'00' NO AUTHENTICATION REQUIRED o X'01' GSSAPI o X'02' USERNAME/PASSWORD o X'03' to X'7F' IANA ASSIGNED o X'80' to X'FE' RESERVED FOR PRIVATE METHODS o X'FF' NO ACCEPTABLE METHODS
Compliant implementations MUST support GSSAPI and SHOULD support USERNAME/PASSWORD authentication methods.
------------------------------------------------------------------------------------------------
So if socks proxy has to authenticate the socks client, the username/password would have been supplied already by the client over the socks connection it attempted (so no need for or thoughts for different auth methods if socks is solely used by the client). Also, if no authentication required was chosen by the socks client, and on FortiGate we enabled socks authentication, the connection terminates failing authentication.
Best regards,
Jin