Skip to content

Commit f67d265

Browse files
author
schwid
committed
initial
0 parents  commit f67d265

14 files changed

+289
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Fri May 06 12:20:23 MSD 2011
2+
eclipse.preferences.version=1
3+
encoding/<project>=UTF-8
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Fri May 06 12:20:23 MSD 2011
2+
eclipse.preferences.version=1
3+
line.separator=\n

assembly/assembly.xml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<assembly>
2+
<id>distr</id>
3+
<formats>
4+
<format>tar.gz</format>
5+
<format>dir</format>
6+
</formats>
7+
<includeBaseDirectory>false</includeBaseDirectory>
8+
<dependencySets>
9+
<dependencySet>
10+
<includes>
11+
<include>*:jar:*</include>
12+
</includes>
13+
<outputDirectory>lib</outputDirectory>
14+
<unpack>false</unpack>
15+
<fileMode>664</fileMode>
16+
<directoryMode>775</directoryMode>
17+
</dependencySet>
18+
</dependencySets>
19+
<fileSets>
20+
<fileSet>
21+
<directory>assembly/bin</directory>
22+
<outputDirectory>/bin</outputDirectory>
23+
<fileMode>775</fileMode>
24+
<directoryMode>775</directoryMode>
25+
</fileSet>
26+
<fileSet>
27+
<directory>assembly/conf</directory>
28+
<outputDirectory>/conf</outputDirectory>
29+
<fileMode>664</fileMode>
30+
<directoryMode>775</directoryMode>
31+
</fileSet>
32+
<fileSet>
33+
<directory>assembly/log</directory>
34+
<outputDirectory>/log</outputDirectory>
35+
<fileMode>666</fileMode>
36+
<directoryMode>777</directoryMode>
37+
</fileSet>
38+
</fileSets>
39+
</assembly>

assembly/bin/add2cp.bat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
@set CLASSPATH=%CLASSPATH%;%1
3+

assembly/bin/readme.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NIOSocks Launch Scripts

assembly/bin/start-proxy.bat

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@set BIN=%~dp0
2+
3+
@set CLASSPATH="..\conf"
4+
5+
@for %%a in (..\lib\*.jar) do @call add2cp.bat %%a
6+
7+
@java -classpath %CLASSPATH% org.ineto.niosocks.SocksLauncher %BIN% %1
8+
9+
pause

assembly/bin/start-proxy.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
BIN=`dirname "$0"`
4+
5+
CLASSPATH='../conf'
6+
7+
for f in ../lib/*.jar; do
8+
CLASSPATH=${CLASSPATH}:$f;
9+
done
10+
11+
java -server -classpath ${CLASSPATH} org.ineto.niosocks.SocksLauncher `cd $BIN; pwd` $1
12+

assembly/conf/log4j.properties

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
log4j.rootLogger=WARN, stdout
2+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
3+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
4+
log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
5+
log4j.logger.org.ineto.niosocks=INFO

assembly/conf/socks.properties

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
listen.port=1080
2+

assembly/log/readme.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
niosocks log directory

license.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright Ineto.org
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

pom.xml

+181
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>org.ineto.niosocks</groupId>
6+
<artifactId>niosocks</artifactId>
7+
<version>0.0.1${BUILD_TAG}</version>
8+
<packaging>jar</packaging>
9+
<name>NIOSocks</name>
10+
<description>NIOSocks - Open Source Java NIO Socks Proxy</description>
11+
<build>
12+
<plugins>
13+
<plugin>
14+
<groupId>org.apache.maven.plugins</groupId>
15+
<artifactId>maven-clean-plugin</artifactId>
16+
<version>2.4.1</version>
17+
</plugin>
18+
<plugin>
19+
<groupId>org.apache.maven.plugins</groupId>
20+
<artifactId>maven-resources-plugin</artifactId>
21+
<version>2.5</version>
22+
<configuration>
23+
<encoding>UTF-8</encoding>
24+
</configuration>
25+
</plugin>
26+
<plugin>
27+
<groupId>org.apache.maven.plugins</groupId>
28+
<artifactId>maven-compiler-plugin</artifactId>
29+
<version>2.3.2</version>
30+
<inherited>true</inherited>
31+
<configuration>
32+
<source>1.6</source>
33+
<target>1.6</target>
34+
<encoding>UTF-8</encoding>
35+
</configuration>
36+
</plugin>
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-eclipse-plugin</artifactId>
40+
<version>2.8</version>
41+
<configuration>
42+
<downloadSources>true</downloadSources>
43+
<downloadJavadocs>true</downloadJavadocs>
44+
<wtpversion>2.0</wtpversion>
45+
</configuration>
46+
</plugin>
47+
<plugin>
48+
<groupId>org.apache.maven.plugins</groupId>
49+
<artifactId>maven-surefire-plugin</artifactId>
50+
<version>2.4.3</version>
51+
<configuration>
52+
<junitArtifactName>org.junit:com.springsource.org.junit</junitArtifactName>
53+
<argLine>-Xmx512M</argLine>
54+
</configuration>
55+
</plugin>
56+
<plugin>
57+
<groupId>org.apache.maven.plugins</groupId>
58+
<artifactId>maven-jar-plugin</artifactId>
59+
<version>2.3.1</version>
60+
<configuration>
61+
<archive>
62+
<manifest>
63+
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
64+
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
65+
</manifest>
66+
<manifestEntries>
67+
<Implementation-Version>${project.version}</Implementation-Version>
68+
</manifestEntries>
69+
</archive>
70+
</configuration>
71+
<executions>
72+
<execution>
73+
<goals>
74+
<goal>test-jar</goal>
75+
</goals>
76+
<phase>package</phase>
77+
</execution>
78+
</executions>
79+
</plugin>
80+
<plugin>
81+
<groupId>org.apache.maven.plugins</groupId>
82+
<artifactId>maven-source-plugin</artifactId>
83+
<version>2.1.2</version>
84+
<configuration>
85+
<attach>true</attach>
86+
</configuration>
87+
<executions>
88+
<execution>
89+
<goals>
90+
<goal>jar</goal>
91+
</goals>
92+
</execution>
93+
</executions>
94+
</plugin>
95+
<plugin>
96+
<groupId>org.apache.maven.plugins</groupId>
97+
<artifactId>maven-install-plugin</artifactId>
98+
<version>2.3.1</version>
99+
</plugin>
100+
<plugin>
101+
<artifactId>maven-assembly-plugin</artifactId>
102+
<configuration>
103+
<descriptors>
104+
<descriptor>assembly/assembly.xml</descriptor>
105+
</descriptors>
106+
</configuration>
107+
<executions>
108+
<execution>
109+
<id>make-assembly</id>
110+
<phase>install</phase>
111+
<goals>
112+
<goal>attached</goal>
113+
</goals>
114+
</execution>
115+
</executions>
116+
</plugin>
117+
</plugins>
118+
</build>
119+
<dependencies>
120+
<dependency>
121+
<groupId>commons-collections</groupId>
122+
<artifactId>commons-collections</artifactId>
123+
<version>3.2.1</version>
124+
</dependency>
125+
<dependency>
126+
<groupId>commons-lang</groupId>
127+
<artifactId>commons-lang</artifactId>
128+
<version>2.4</version>
129+
</dependency>
130+
<dependency>
131+
<groupId>commons-cli</groupId>
132+
<artifactId>commons-cli</artifactId>
133+
<version>1.2</version>
134+
</dependency>
135+
<dependency>
136+
<groupId>commons-logging</groupId>
137+
<artifactId>commons-logging</artifactId>
138+
<version>1.1.1</version>
139+
</dependency>
140+
<dependency>
141+
<groupId>commons-pool</groupId>
142+
<artifactId>commons-pool</artifactId>
143+
<version>1.5.2</version>
144+
</dependency>
145+
<dependency>
146+
<groupId>commons-io</groupId>
147+
<artifactId>commons-io</artifactId>
148+
<version>1.4</version>
149+
</dependency>
150+
<dependency>
151+
<groupId>junit</groupId>
152+
<artifactId>junit</artifactId>
153+
<version>4.5</version>
154+
</dependency>
155+
<dependency>
156+
<groupId>org.jboss.netty</groupId>
157+
<artifactId>netty</artifactId>
158+
<version>3.2.3.Final</version>
159+
</dependency>
160+
<dependency>
161+
<groupId>log4j</groupId>
162+
<artifactId>log4j</artifactId>
163+
<version>1.2.14</version>
164+
</dependency>
165+
</dependencies>
166+
<properties>
167+
<BUILD_TAG>-SNAPSHOT</BUILD_TAG>
168+
</properties>
169+
<repositories>
170+
<repository>
171+
<id>repository.jboss.org</id>
172+
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
173+
<releases>
174+
<enabled>true</enabled>
175+
</releases>
176+
<snapshots>
177+
<enabled>false</enabled>
178+
</snapshots>
179+
</repository>
180+
</repositories>
181+
</project>

readme.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
NIOSocks is an open source Java NIO Socks Proxy Solution
2+
3+
=Requirements=
4+
Java >= 1.6
5+
6+
7+

src/main/java/SocksLauncher.java

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
public class SocksLauncher {
3+
4+
public static void main(String[] args) {
5+
6+
System.out.println("SocksLauncher");
7+
8+
}
9+
10+
}

0 commit comments

Comments
 (0)