Skip to content

Commit

Permalink
Merge branch 'release/0.4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
lparam committed Nov 20, 2015
2 parents 4572606 + 5955d05 commit 73b68aa
Show file tree
Hide file tree
Showing 35 changed files with 194 additions and 189 deletions.
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ tags
*.user
.ycm_extra_conf.pyc

/xsocksd
/xsocks
/xtproxy
/xforwarder
/xtunnel
/xSocksd
/xSocks
/xTproxy
/xForwarder
/xTunnel
7 changes: 6 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v0.4.2 (2015-10-20)
-----------
* Change: Rename program name


v0.4.1 (2015-10-18)
-----------
* Hotfix: Openwrt build script
Expand Down Expand Up @@ -51,7 +56,7 @@ v0.2.2 (2015-9-01)

v0.2.1 (2015-6-09)
-----------
* Change: Build native xsocks with WinDDK for windows
* Change: Build native xSocks with WinDDK for windows
* Feature: Support mingw-w64


Expand Down
82 changes: 41 additions & 41 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MAJOR = 0
MINOR = 4
PATCH = 1
NAME = xsocks
PATCH = 2
NAME = xSocks

ifdef O
ifeq ("$(origin O)", "command line")
Expand Down Expand Up @@ -106,11 +106,11 @@ endif

LDFLAGS += $(LIBS)

XSOCKSD=$(OBJTREE)/xsocksd
XSOCKS=$(OBJTREE)/xsocks
XTPROXY=$(OBJTREE)/xtproxy
XFORWARDER=$(OBJTREE)/xforwarder
XTUNNEL=$(OBJTREE)/xtunnel
XSOCKSD=$(OBJTREE)/xSocksd
XSOCKS=$(OBJTREE)/xSocks
XTPROXY=$(OBJTREE)/xTproxy
XFORWARDER=$(OBJTREE)/xForwarder
XTUNNEL=$(OBJTREE)/xTunnel

#########################################################################
include $(SRCTREE)/config.mk
Expand Down Expand Up @@ -216,10 +216,10 @@ $(XSOCKSD): \
$(OBJTREE)/src/consumer.o \
$(OBJTREE)/src/cache.o \
$(OBJTREE)/src/packet.o \
$(OBJTREE)/src/xsocksd_udprelay.o \
$(OBJTREE)/src/xsocksd_client.o \
$(OBJTREE)/src/xsocksd_remote.o \
$(OBJTREE)/src/xsocksd.o
$(OBJTREE)/src/xSocksd_udprelay.o \
$(OBJTREE)/src/xSocksd_client.o \
$(OBJTREE)/src/xSocksd_remote.o \
$(OBJTREE)/src/xSocksd.o
$(LINK) $^ -o $@ $(LDFLAGS) $(OBJTREE)/3rd/c-ares/.libs/libcares.a
else
$(XSOCKSD).exe: \
Expand All @@ -231,10 +231,10 @@ $(XSOCKSD).exe: \
src/consumer.o \
src/cache.o \
src/packet.o \
src/xsocksd_udprelay.o \
src/xsocksd_client.o \
src/xsocksd_remote.o \
src/xsocksd.o
src/xSocksd_udprelay.o \
src/xSocksd_client.o \
src/xSocksd_remote.o \
src/xSocksd.o
$(LINK) $^ -o $@ 3rd/c-ares/.libs/libcares.a $(LDFLAGS)
endif

Expand All @@ -249,10 +249,10 @@ XSOCKS_OBJS = \
$(OBJTREE)/src/consumer.o \
$(OBJTREE)/src/cache.o \
$(OBJTREE)/src/packet.o \
$(OBJTREE)/src/xsocks_udprelay.o \
$(OBJTREE)/src/xsocks_client.o \
$(OBJTREE)/src/xsocks_remote.o \
$(OBJTREE)/src/xsocks.o
$(OBJTREE)/src/xSocks_udprelay.o \
$(OBJTREE)/src/xSocks_client.o \
$(OBJTREE)/src/xSocks_remote.o \
$(OBJTREE)/src/xSocks.o

ifdef ANDROID
XSOCKS_OBJS += $(OBJTREE)/src/android.o
Expand All @@ -272,10 +272,10 @@ $(XSOCKS).exe: \
src/consumer.o \
src/cache.o \
src/packet.o \
src/xsocks_udprelay.o \
src/xsocks_client.o \
src/xsocks_remote.o \
src/xsocks.o
src/xSocks_udprelay.o \
src/xSocks_client.o \
src/xSocks_remote.o \
src/xSocks.o
$(LINK) $^ -o $@ $(LDFLAGS)
endif

Expand All @@ -288,10 +288,10 @@ $(XTPROXY): \
$(OBJTREE)/src/daemon.o \
$(OBJTREE)/src/signal.o \
$(OBJTREE)/src/consumer.o \
$(OBJTREE)/src/xtproxy_udprelay.o \
$(OBJTREE)/src/xtproxy_client.o \
$(OBJTREE)/src/xtproxy_remote.o \
$(OBJTREE)/src/xtproxy.o
$(OBJTREE)/src/xTproxy_udprelay.o \
$(OBJTREE)/src/xTproxy_client.o \
$(OBJTREE)/src/xTproxy_remote.o \
$(OBJTREE)/src/xTproxy.o
$(LINK) $^ -o $@ $(LDFLAGS)

ifndef MINGW32
Expand All @@ -304,10 +304,10 @@ $(XFORWARDER): \
$(OBJTREE)/src/signal.o \
$(OBJTREE)/src/consumer.o \
$(OBJTREE)/src/cache.o \
$(OBJTREE)/src/xforwarder_udprelay.o \
$(OBJTREE)/src/xforwarder_client.o \
$(OBJTREE)/src/xforwarder_remote.o \
$(OBJTREE)/src/xforwarder.o
$(OBJTREE)/src/xForwarder_udprelay.o \
$(OBJTREE)/src/xForwarder_client.o \
$(OBJTREE)/src/xForwarder_remote.o \
$(OBJTREE)/src/xForwarder.o
$(LINK) $^ -o $@ $(LDFLAGS)
else
$(XFORWARDER).exe: \
Expand All @@ -317,10 +317,10 @@ $(XFORWARDER).exe: \
src/packet.o \
src/consumer.o \
src/cache.o \
src/xforwarder_udprelay.o \
src/xforwarder_client.o \
src/xforwarder_remote.o \
src/xforwarder.o
src/xForwarder_udprelay.o \
src/xForwarder_client.o \
src/xForwarder_remote.o \
src/xForwarder.o
$(LINK) $^ -o $@ $(LDFLAGS)
endif

Expand All @@ -333,9 +333,9 @@ $(XTUNNEL): \
$(OBJTREE)/src/daemon.o \
$(OBJTREE)/src/signal.o \
$(OBJTREE)/src/consumer.o \
$(OBJTREE)/src/xtunnel_source.o \
$(OBJTREE)/src/xtunnel_target.o \
$(OBJTREE)/src/xtunnel.o
$(OBJTREE)/src/xTunnel_source.o \
$(OBJTREE)/src/xTunnel_target.o \
$(OBJTREE)/src/xTunnel.o
$(LINK) $^ -o $@ $(LDFLAGS)
else
$(XTUNNEL).exe: \
Expand All @@ -344,9 +344,9 @@ $(XTUNNEL).exe: \
src/crypto.o \
src/packet.o \
src/consumer.o \
src/xtunnel_source.o \
src/xtunnel_target.o \
src/xtunnel.o
src/xTunnel_source.o \
src/xTunnel_target.o \
src/xTunnel.o
$(LINK) $^ -o $(OBJTREE)/$@ $(LDFLAGS)
endif

Expand Down
58 changes: 29 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
xsocks
xSocks
=================
A secure and fast proxy for protect your network traffic

Introdution
------------
* xsocksd: Backend of xsocks, xtproxy, xforwarder
* xsocks: A socks5 server
* xtproxy: A Transparent Proxy
* xforwarder: Forward data to a specific server
* xtunnel: Like xforwarder, but standalone and specify target on server side
* xSocksd: Backend of xSocks, xTproxy, xForwarder
* xSocks: A socks5 server
* xTproxy: A Transparent Proxy
* xForwarder: Forward data to a specific server
* xTunnel: Like xForwarder, but standalone and specify target on server side

Features
------------
* Transparent Proxy for all tcp traffic and udp packet
* Multithreading
* Cross-platform, including PC (Linux, [Windows](https://github.com/lparam/xsocks-windows)), Mobile ([Android](https://github.com/lparam/xsocks-android)) and Router (OpenWRT)
* Cross-platform, including PC (Linux, [Windows](https://github.com/lparam/xSocks-windows)), Mobile ([Android](https://github.com/lparam/xSocks-android)) and Router (OpenWRT)

BUILD
------------
Expand All @@ -29,8 +29,8 @@ make && sudo make install

```bash
# At OpenWRT build root
git clone https://github.com/lparam/xsocks.git package/xsocks
make package/xsocks/openwrt/compile
git clone https://github.com/lparam/xSocks.git package/xSocks
make package/xSocks/openwrt/compile
```

### Windows
Expand All @@ -48,26 +48,26 @@ Usage
### Server

```bash
xsocksd -k PASSWORD
xtunnel -m server -k PASSWORD -t TARGET:PORT
xSocksd -k PASSWORD
xTunnel -m server -k PASSWORD -t TARGET:PORT
```

Multithreading:
```bash
xsocksd -k PASSWORD -c THREADS
xSocksd -k PASSWORD -c THREADS
```

Stop:
```bash
xsocksd --signal stop
xSocksd --signal stop
```

### Client

```bash
xsocks -s SERVER:PORT -k PASSWORD
xforwarder -s SERVER:PORT -k PASSWORD -d DESTINATION:PORT
xtunnel -m client -k PASSWORD -t TARGET:PORT
xSocks -s SERVER:PORT -k PASSWORD
xForwarder -s SERVER:PORT -k PASSWORD -d DESTINATION:PORT
xTunnel -m client -k PASSWORD -t TARGET:PORT
```

### Transparent Proxy
Expand All @@ -76,10 +76,10 @@ Proxy all tcp traffic and udp packet transparently on gateway.

```bash
root@OpenWrt:~# opkg install iptables-mod-tproxy
root@OpenWrt:~# opkg install xsocks_VER_ARCH.ipk
root@OpenWrt:~# opkg install xSocks_VER_ARCH.ipk
```

Modify your SERVER and PASSWORD in /etc/init.d/xsocks
Modify your SERVER and PASSWORD in /etc/init.d/xSocks
```bash
#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2014 OpenWrt.org
Expand All @@ -100,24 +100,24 @@ CHAIN=XSOCKS

start() {
tproxy_start
mkdir -p /var/run/xsocks
xsocks -s $SERVER -k $PASSWORD
xtproxy -s $SERVER -k $PASSWORD
xforwarder -l 0.0.0.0:5533 -d 8.8.8.8:53 -s $SERVER -k $PASSWORD
mkdir -p /var/run/xSocks
xSocks -s $SERVER -k $PASSWORD
xTproxy -s $SERVER -k $PASSWORD
xForwarder -l 0.0.0.0:5533 -d 8.8.8.8:53 -s $SERVER -k $PASSWORD
}

stop() {
tproxy_stop
xsocks --signal stop
xtproxy --signal stop
xforwarder --signal stop
xSocks --signal stop
xTproxy --signal stop
xForwarder --signal stop
}

shutdown() {
tproxy_stop
xsocks --signal quit
xtproxy --signal quit
xforwarder --signal quit
xSocks --signal quit
xTproxy --signal quit
xForwarder --signal quit
}

tproxy_start() {
Expand Down Expand Up @@ -165,7 +165,7 @@ tproxy_stop() {
```

```bash
root@OpenWrt:~# /etc/init.d/xsocks start
root@OpenWrt:~# /etc/init.d/xSocks start
```

```bash
Expand Down
26 changes: 13 additions & 13 deletions openwrt/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=xsocks
PKG_VERSION:=0.4.1
PKG_NAME:=xSocks
PKG_VERSION:=0.4.2
PKG_RELEASE=

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/lparam/xsocks.git
PKG_SOURCE_URL:=https://github.com/lparam/xSocks.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=v$(PKG_VERSION)

Expand All @@ -18,27 +18,27 @@ PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk

define Package/xsocks/Default
define Package/xSocks/Default
SECTION:=net
CATEGORY:=Network
TITLE:=A secure and fast proxy for protect your network traffic
URL:=https://github.com/lparam/xsocks
URL:=https://github.com/lparam/xSocks
endef

define Package/xsocks
$(call Package/xsocks/Default)
define Package/xSocks
$(call Package/xSocks/Default)
DEPENDS:=+libpthread +librt
endef

define Package/xsocks/description
xsocks is a secure and fast proxy for protect your network traffic
define Package/xSocks/description
xSocks is a secure and fast proxy for protect your network traffic
endef

define Package/xsocks/install
define Package/xSocks/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/xsocks.init $(1)/etc/init.d/xsocks
$(INSTALL_BIN) ./files/xSocks.init $(1)/etc/init.d/xSocks
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/x{socks,tproxy,forwarder,tunnel} $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/x{Socks,Tproxy,Forwarder,Tunnel} $(1)/usr/bin
endef

$(eval $(call BuildPackage,xsocks))
$(eval $(call BuildPackage,xSocks))
Loading

0 comments on commit 73b68aa

Please sign in to comment.