Skip to content

Instantly share code, notes, and snippets.

🎸
solo...

ghostsf ghostsf

🎸
solo...
Block or report user

Report or block ghostsf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ghostsf
ghostsf / ssr.sh
Created May 16, 2019
auto-ssr-doubi
View ssr.sh
#!/usr/bin/env bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#=================================================
# System Required: CentOS 6+/Debian 6+/Ubuntu 14.04+
# Description: Install the ShadowsocksR server
# Version: 2.0.38
# Author: Toyo
# Blog: https://doub.io/ss-jc42/
View keybase.md

Keybase proof

I hereby claim:

  • I am ghostsf on github.
  • I am ghostsf (https://keybase.io/ghostsf) on keybase.
  • I have a public key ASAbLRQUGHQJ7gkcyqlaCN80LQ8zBBjccPny06EmdPkM5Qo

To claim this, I am signing this object:

View IPKit.java
import javax.servlet.http.HttpServletRequest;
public class IpKit {
public static String getRealIp(HttpServletRequest request) {
String ip = request.getHeader("x-forwarded-for");
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
View OpenldapUtil.php
<?php
/**
* simple class for LDAP authentification
*
* Created by ghostsf
* Date: 2016/4/9
*/
class openldap
{
You can’t perform that action at this time.