merged from prtocol 4 branch; fix for the standalone java proxy version, fixed merge conflict
merged from prtocol 4 branch; fix for the standalone java proxy version, fixed merge conflict

runeh/dragonfly-stp-1,runeh/dragonfly-stp-1,runeh/dragonfly-stp-1