diff --git a/.gitignore b/.gitignore index c2c4a5a..0f0d827 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -target/** \ No newline at end of file +target/** +db/** +.ideaDataSources/** \ No newline at end of file diff --git a/jProxy.ipr b/jProxy.ipr index 9437849..ca4b88a 100644 --- a/jProxy.ipr +++ b/jProxy.ipr @@ -10,9 +10,17 @@ - + + + + h2.unified + true + org.h2.Driver + jdbc:h2:file:$PROJECT_DIR$/../proxy/db/jproxy.h2db + + @@ -159,7 +167,285 @@ + + + + + + + " + + + master_key + sa + *:*|@:@|JPROXY.H2DB:* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -171,6 +457,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -182,5 +611,665 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jProxy.iws b/jProxy.iws index 059efad..97a50b7 100644 --- a/jProxy.iws +++ b/jProxy.iws @@ -1,7 +1,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -152,10 +279,11 @@ - + @@ -170,6 +298,11 @@ + + + + + @@ -200,22 +333,98 @@ - + + + + - + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html new file mode 100644 index 0000000..0ae252f --- /dev/null +++ b/src/main/resources/templates/index.html @@ -0,0 +1,11 @@ + + + + + Hello + + +

Hello, !

+ + \ No newline at end of file diff --git a/src/main/resources/templates/logout.html b/src/main/resources/templates/logout.html new file mode 100644 index 0000000..b2c0f25 --- /dev/null +++ b/src/main/resources/templates/logout.html @@ -0,0 +1,16 @@ + + + + + Logout form + + +
+ + +
+ + \ No newline at end of file diff --git a/src/main/resources/templates/proxyForm.html b/src/main/resources/templates/proxyForm.html new file mode 100644 index 0000000..6d404e1 --- /dev/null +++ b/src/main/resources/templates/proxyForm.html @@ -0,0 +1,16 @@ + + + + + + <th:block th:if="${proxyInstance.id} == 0">New proxy</th:block> + <th:block th:if="${proxyInstance.id} == 0" th:text="'Proxy #'+${proxyInstance.id}"></th:block> + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/proxylist.html b/src/main/resources/templates/proxylist.html new file mode 100644 index 0000000..35deb4a --- /dev/null +++ b/src/main/resources/templates/proxylist.html @@ -0,0 +1,61 @@ + + + + + Proxy list + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RunningEnabledNameLocal hostLocal portRemote hostRemote portManage
+ + V + + NameLocal hostLocal portRemote hostRemote port + + + + disable + + + enable + + +   + edit +
+ +

+ Add proxy +

+ + + \ No newline at end of file diff --git a/src/test/java/ru/bvn13/JProxyTest.java b/src/test/java/ru/bvn13/JProxyTest.java index 3835396..d11d163 100644 --- a/src/test/java/ru/bvn13/JProxyTest.java +++ b/src/test/java/ru/bvn13/JProxyTest.java @@ -4,8 +4,7 @@ import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; -import ru.bvn13.jproxy.JProxy; -import ru.bvn13.jproxy.ProxyServer; +import ru.bvn13.jproxy.engine.ProxyServer; import java.io.DataInputStream; import java.io.DataOutputStream; @@ -29,11 +28,11 @@ public class JProxyTest "Host: yandex.ru\n" + "Accept-Language: en-us\n" + "Accept-Encoding: gzip, deflate\n" + - "Connection: Keep-Alive"; + "Connection: Keep-Alive\n"+ + "\n"; @Before public void before() { - //proxy = new ProxyServer(8099, "yandex.ru", 80); } @Test