This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:buster | |
RUN apt-get update; apt-get install -y gzip curl make gcc libevent-dev libssl-dev zlib1g-dev | |
RUN curl -L https://dist.torproject.org/tor-0.4.3.5.tar.gz | gzip -dc | tar x -C ~/ | |
RUN cd ~/tor-0.4.3.5; ./configure --prefix=/opt/tor; make; make install; chmod +x /opt/tor/bin/*; cd ~ | |
RUN apt-get purge -y curl make gcc zlib1g-dev; apt-get autoremove --purge -y; rm -rf /var/lib/apt/lists; rm -rf ~/tor-0.4.3.5 | |
COPY torrc /opt/tor/etc/ | |
ENTRYPOINT ["/opt/tor/bin/tor"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check if the object is null or empty | |
* | |
* @param obj - the test object | |
* @return true if the value is missing | |
*/ | |
public static boolean isMissing(Object obj) { | |
if (obj == null) return true; | |
if (obj instanceof CharSequence) return (obj).toString().trim().length() < 1; | |
if (obj instanceof Collection) return ((Collection) obj).size() < 1; |