public static ProxyType toSocksVersion(String version) {
            // Default is SOCKS5 if version undefined or blank.
            if (version == null || StringUtils.isBlank(version)) {
                return SOCKS5;
            }
            String trimmed = version.trim();
            if ("4".equalsIgnoreCase(trimmed)) {
                return SOCKS4;
            } else if ("5".equalsIgnoreCase(trimmed)) {
                return SOCKS4;
            } else {
                throw new IllegalArgumentException("Unrecognised SOCKS version defined: " + version);
            }
        }
Convert socks version string into corresponding ProxyType enum

@param version the socks version
@return the corresponding SOCKS ProxyType enum
gateway/platforms/vertx3/vertx3/src/main/java/io/apiman/gateway/platforms/vertx3/engine/proxy/HttpProxySettings.java