Skip to content

Commit

Permalink
sonatype
Browse files Browse the repository at this point in the history
  • Loading branch information
Karasiq committed Sep 21, 2015
1 parent d26c1bc commit 61e3d6a
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 11 deletions.
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2015 Karasiq

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
44 changes: 38 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name := "proxychain"

organization := "com.karasiq"
organization := "com.github.karasiq"

version := "1.4"
version := "1.5"

isSnapshot := false

scalaVersion := "2.11.7"

Expand All @@ -12,10 +14,10 @@ libraryDependencies ++= Seq(
"commons-io" % "commons-io" % "2.4",
"org.apache.httpcomponents" % "httpclient" % "4.3.3",
"com.typesafe.akka" %% "akka-actor" % "2.3.11",
"com.karasiq" %% "cryptoutils" % "1.1",
"com.karasiq" %% "proxyutils" % "1.0",
"org.scalatest" %% "scalatest" % "2.2.4" % "test",
"com.karasiq" %% "coffeescript" % "1.0"
"com.github.karasiq" %% "cryptoutils" % "1.2",
"com.github.karasiq" %% "proxyutils" % "1.0",
"com.github.karasiq" %% "coffeescript" % "1.0"
)

scalacOptions ++= Seq("-optimize", "-deprecation", "-feature")
Expand All @@ -28,4 +30,34 @@ maintainer := "Karasiq <[email protected]>"

packageSummary := "Proxychain"

packageDescription := "Proxy-chaining SOCKS/HTTP/TLS proxy server"
packageDescription := "Proxy-chaining SOCKS/HTTP/TLS proxy server"

publishMavenStyle := true

publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}

publishArtifact in Test := false

pomIncludeRepository := { _ false }

licenses := Seq("Apache License, Version 2.0" url("http://opensource.org/licenses/Apache-2.0"))

homepage := Some(url("https://github.com/Karasiq/" + name.value))

pomExtra := <scm>
<url>git@github.com:Karasiq/{name.value}.git</url>
<connection>scm:git:git@github.com:Karasiq/{name.value}.git</connection>
</scm>
<developers>
<developer>
<id>karasiq</id>
<name>Piston Karasiq</name>
<url>https://github.com/Karasiq</url>
</developer>
</developers>
2 changes: 1 addition & 1 deletion setup/setup.iss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define OutputName "proxychain"
#define MyAppName "Proxychain"
#define MyAppVersion "1.4"
#define MyAppVersion "1.5"
#define MyAppPublisher "Karasiq, Inc."
#define MyAppURL "http://www.github.com/Karasiq"
#define MyAppExeName "bin\proxychain.bat"
Expand Down
9 changes: 5 additions & 4 deletions src/main/scala/com/karasiq/proxychain/AppConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import java.net.InetSocketAddress

import com.karasiq.fileutils.PathUtils._
import com.karasiq.proxy.{ProxyChain, ProxyChainFactory, ProxyConnectorFactory}
import com.karasiq.tls.{TLS, TLSCertificateVerifier, TLSKeyStore}
import com.karasiq.tls.x509.CertificateVerifier
import com.karasiq.tls.{TLS, TLSKeyStore}
import com.typesafe.config.{Config, ConfigFactory}

object AppConfig {
Expand Down Expand Up @@ -34,12 +35,12 @@ object AppConfig {

def apply(): AppConfig = apply(externalConfig().getConfig("proxyChain"))

case class TLSConfig(keyStore: TLSKeyStore, verifier: TLSCertificateVerifier, keySet: TLS.KeySet, clientAuth: Boolean)
case class TLSConfig(keyStore: TLSKeyStore, verifier: CertificateVerifier, keySet: TLS.KeySet, clientAuth: Boolean)

def tlsConfig(): TLSConfig = {
val config = AppConfig.externalConfig().getConfig("proxyChain.tls")

val verifier = TLSCertificateVerifier.fromTrustStore(TLSCertificateVerifier.trustStore(config.getString("trust-store")))
val verifier = CertificateVerifier.fromTrustStore(CertificateVerifier.trustStore(config.getString("trust-store")))
val keyStore = new TLSKeyStore(TLSKeyStore.keyStore(config.getString("key-store"), config.getString("key-store-pass")), config.getString("key-store-pass"))
val clientAuth = config.getBoolean("client-auth")
val keySet = keyStore.getKeySet(config.getString("key"))
Expand All @@ -53,7 +54,7 @@ object AppConfig {
tls.keyStore
}

override protected def certificateVerifier: TLSCertificateVerifier = {
override protected def certificateVerifier: CertificateVerifier = {
tls.verifier
}
}
Expand Down

0 comments on commit 61e3d6a

Please sign in to comment.