-
Notifications
You must be signed in to change notification settings - Fork 3k
Mobile Platforms
The Trojan Protocol has yet to be implemented on any mobile platforms. It would be unlikely for an implementation to come out any time soon, due to the complexity involed. (i.e g to implement a session layer protocol on top of a network layer interface). However, there are still various of workarounds which you can use to make Trojan run on Android, iOS or other platforms.
Igniter (trojan for android) is currently under construction. The release versions are not production ready yet but rather for testing purposes. Consult the following for stable usage.
Trojan can be compiled in Termux, an Android terminal emulator. Follow these steps to build and install it:
apt install git clang cmake boost-dev openssl-dev
git clone https://github.com/trojan-gfw/trojan
cd trojan/
cmake -DCMAKE_INSTALL_PREFIX=/data/data/com.termux/files/usr -DENABLE_MYSQL=OFF .
make install
If you encounter linker errors, you may need to patch the CMakeLists.txt
before cmake
:
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,6 +43,7 @@ if(ENABLE_MYSQL)
target_link_libraries(trojan ${MYSQL_LIBRARIES})
add_definitions(-DENABLE_MYSQL)
endif()
+target_link_libraries(trojan atomic)
if(WIN32)
target_link_libraries(trojan wsock32 ws2_32 crypt32)
else()
Next, use Privoxy to convert SOCKS5 proxy to HTTP proxy, and set system proxy settings to privoxy address and port.
Privoxy can be installed via
apt install privoxy
Pharos Pro has implemented trojan protocol.
Shadowrocket seems to have implemented trojan protocol. Now it is in the TestFlight stage.
iOS has more restrictions than Android. Therefore, the only way to use trojan is to setup a computer on the same LAN to run trojan and then either:
Convert SOCKS5 proxy to HTTP proxy by the same means introduced above and set the system proxy settings
OR
Use apps like Potatso to redirect network flow to the SOCKS5 proxy.