While some servers don't allow Optifine or external, EULA primarily refers to what servers are allowed to do (mainly what they are allowed to sell in the store), and it doesn't restrict any modifications. Only a specific server may ban certain mods / clients, EULA doesn't really deal with that...