diff --git a/config.json b/config.json
index ea3a9194072088aa81bf171006b364f24cddd6ee..78985ae6116e10516e251bcff417759ecac7fc7b 100644
--- a/config.json
+++ b/config.json
@@ -1,5 +1,7 @@
 {
   "instance": "soc.phreedom.club",
+  "i2p_http_proxy_addr": "http://127.0.0.1:4444",
+  "tor_proxy_addr": "socks5://127.0.0.1:9050",
   "max_statuses": 40,
   "per_status_mode": false,
   "enabled_nsfw": true,
diff --git a/pleroma-cli.sh b/pleroma-cli.sh
index 81e081ab6497960468b4486a457f876c568c0497..e24afd2a3ce753cd764b01256c4e3105f921756f 100755
--- a/pleroma-cli.sh
+++ b/pleroma-cli.sh
@@ -2,8 +2,24 @@ #!/bin/sh
 
 instance=$(jj -i config.json instance)
 alias default_auth_browser=links
-instance_point="https://$instance/api/v1"
-instance_point_pleroma="https://$instance/api/pleroma"
+
+proxy_init() 
+{
+	if [ $(echo "$instance" | grep -q 'i2p$' ; echo $?) -eq 0 ]; then
+		default_connect_protocol='http'
+		proxy=$(jj -i config.json i2p_http_proxy_addr)
+	elif [ $(echo "$instance" | grep -q 'onion$'; echo $?) -eq 0 ]; then
+		default_connect_protocol='https'
+		proxy=$(jj -i config.json tor_proxy_addr)
+	else
+		default_connect_protocol='https'
+		proxy=''
+	fi
+	export default_connect_protocol
+	export proxy
+}
+instance_point="$default_connect_protocol://$instance/api/v1"
+instance_point_pleroma="$default_connect_protocol://$instance/api/pleroma"
 instance_hist='instance.hist'
 enabled_nsfw=$(jj -i config.json enabled_nsfw)
 hide_reblogs=$(jj -i config.json hide_reblogs)
@@ -22,25 +38,34 @@ #[AUTH SECTION]
 mkdir -m 711 -p .app_sessions
 touch .auth.json
 chmod 600 .auth.json
-auth="$(jj -i .auth.json "$(echo "$instance" | sed 's/\./\\\./g')")"
-echo "Instance: $instance"
-if [ -n "$auth" ]; then
-	default_curl_opt()
-	{
-		curl -s --compressed -H "Authorization: Bearer $auth" "$@"
-	}
-	post_request()
-	{
-		curl -s --compressed -X POST -H "Authorization: Bearer $auth" "$@"
-	}
-	echo '+Authorized account+'
-else
-	default_curl_opt()
-	{
-		curl -s --compressed "$1"
-	}
-	echo 'Please make auth and restart'
-fi
+
+make_login()
+{
+	auth="$(jj -i .auth.json "$(echo "$instance" | sed 's/\./\\\./g')")"
+	echo "Instance: $instance"
+	if [ -n "$auth" ]; then
+		default_curl_opt()
+		{
+			curl --proxy "$proxy" -s --compressed -H "Authorization: Bearer $auth" "$@"
+		}
+		post_request()
+		{
+			curl --proxy "$proxy" -s --compressed -X POST -H "Authorization: Bearer $auth" "$@"
+		}
+		echo '+Authorized account+'
+		export default_curl_opt
+		export post_request
+	else
+		default_curl_opt()
+		{
+			curl --proxy "$proxy" -s --compressed "$1"
+		}
+		export default_curl_opt
+		export post_request=
+		echo 'Please make auth and restart'
+	fi
+}
+make_login
 
 auth_api_create_client()
 {
@@ -831,8 +856,9 @@ 	esac
 	if [ $empty -eq 0 ]; then
 		echo "$instance" >> $instance_hist
 		cat $instance_hist | sort | uniq | tee $instance_hist 1>>/dev/null
-		export instance
-		export instance_point="https://$instance/api/v1"
+		proxy_init
+		instance_point="$default_connect_protocol://$instance/api/v1"
+		instance_point_pleroma="$default_connect_protocol://$instance/api/pleroma"
 		conf_instance_state=$(echo 'Permanent\nTemporaly' | fzy)
 		if [ "$conf_instance_state" = 'Permanent' ]; then
 			jj -i config.json instance -v "$instance" -o config.json
@@ -840,25 +866,7 @@ 		else
 			echo ''
 		fi
 		clear
-		auth="$(jj -i .auth.json "$(echo "$instance" | sed 's/\./\\\./g')")"
-		echo "Instance: $instance"
-		if [ -n "$auth" ]; then
-			default_curl_opt()
-			{
-				curl -s --compressed -H "Authorization: Bearer $auth" "$@"
-			}
-			post_request()
-			{
-				curl -s --compressed -X POST -H "Authorization: Bearer $auth" "$@"
-			}
-			echo '+Authorized account+'
-		else
-			default_curl_opt()
-			{
-				curl -s --compressed "$1"
-			}
-			echo 'Please make auth and restart'
-		fi
+		make_login
 	fi ;;
 	"$authmake") auth_api_get_token ;;
 	"$Exit") exit 0 ;;
