Compare commits

..

6 Commits

Author SHA1 Message Date
albexk 6d654aff91 Add import disclaimer (#27) 2025-03-08 13:26:31 +03:00
albexk 5bffd56583 Fix typo and update icons (#9)
Fix typo and update icons
2024-06-17 18:17:08 +01:00
pokamest 6d295a9475 Merge pull request #7 from amnezia-vpn/bump-awg
Bump amneziawg-go to v0.2.11 and go to 1.22.3
2024-05-30 20:11:03 +01:00
albexk c906e7c1c7 Bump amneziawg-go to v0.2.11 and go to 1.22.3 2024-05-24 19:33:51 +03:00
pokamest bebf19aaf6 Merge pull request #5 from amnezia-vpn/fix/udpgso
Fix udpgso
2024-05-14 04:37:03 -07:00
albexk cef17bac38 Fix udpgso 2024-05-14 14:24:10 +03:00
22 changed files with 64 additions and 55 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
amneziawgVersionCode=3
amneziawgVersionName=1.1.0
amneziawgVersionCode=5
amneziawgVersionName=1.1.2
amneziawgPackageName=org.amnezia.awg
# When configured, Gradle will run in incubating parallel mode.
+4 -4
View File
@@ -20,12 +20,12 @@ export GOARCH := $(NDK_GO_ARCH_MAP_$(ANDROID_ARCH_NAME))
export GOOS := android
export CGO_ENABLED := 1
GO_VERSION := 1.22.1
GO_VERSION := 1.22.3
GO_PLATFORM := $(shell uname -s | tr '[:upper:]' '[:lower:]')-$(NDK_GO_ARCH_MAP_$(shell uname -m))
GO_TARBALL := go$(GO_VERSION).$(GO_PLATFORM).tar.gz
GO_HASH_darwin-amd64 := 3bc971772f4712fec0364f4bc3de06af22a00a12daab10b6f717fdcd13156cc0
GO_HASH_darwin-arm64 := f6a9cec6b8a002fcc9c0ee24ec04d67f430a52abc3cfd613836986bcc00d8383
GO_HASH_linux-amd64 := aab8e15785c997ae20f9c88422ee35d962c4562212bb0f879d052a35c8307c7f
GO_HASH_darwin-amd64 := 610e48c1df4d2f852de8bc2e7fd2dc1521aac216f0c0026625db12f67f192024
GO_HASH_darwin-arm64 := 02abeab3f4b8981232237ebd88f0a9bad933bc9621791cd7720a9ca29eacbe9d
GO_HASH_linux-amd64 := 8920ea521bad8f6b7bc377b4824982e011c19af27df88a815e3586ea895f1b36
default: $(DESTDIR)/libwg-go.so
+1 -1
View File
@@ -88,7 +88,7 @@ func awgTurnOn(interfaceName string, tunFd int32, settings string) int32 {
}
logger.Verbosef("Attaching to interface %v", name)
device := device.NewDevice(tun, conn.NewStdNetBind(), logger, false)
device := device.NewDevice(tun, conn.NewStdNetBind(), logger)
err = device.IpcSet(settings)
if err != nil {
+4 -14
View File
@@ -1,25 +1,15 @@
module github.com/amnezia-vpn/amneziawg-android
go 1.21.6
go 1.22.3
require (
github.com/amnezia-vpn/amneziawg-go v0.2.5-udptlspipe
golang.org/x/sys v0.17.0
github.com/amnezia-vpn/amneziawg-go v0.2.11
golang.org/x/sys v0.18.0
)
require (
github.com/AdguardTeam/golibs v0.20.0 // indirect
github.com/andybalholm/brotli v1.0.6 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.3.2 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/leninalive/udptlspipe v0.0.0-20240313123600-80348db0072f // indirect
github.com/quic-go/quic-go v0.40.1 // indirect
github.com/refraction-networking/utls v1.6.2 // indirect
github.com/tevino/abool/v2 v2.1.0 // indirect
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
)
+7 -31
View File
@@ -1,39 +1,15 @@
github.com/AdguardTeam/golibs v0.20.0 h1:A9FIdYq7wUKhFYy3z+YZ/Aw5oFUYgW+xgaVAJ0pnnPY=
github.com/AdguardTeam/golibs v0.20.0/go.mod h1:3WunclLLfrVAq7fYQRhd6f168FHOEMssnipVXCxDL/w=
github.com/amnezia-vpn/amneziawg-go v0.2.1 h1:cYcHr/3PgtrQhwueE+qZh3i01ZO0jpgJMcwvsAwoKW8=
github.com/amnezia-vpn/amneziawg-go v0.2.1/go.mod h1:12g0XRbFeGbpXvuCmBOV21YxLWSFnUFJnwgrzyHBUyk=
github.com/amnezia-vpn/amneziawg-go v0.2.4-udptlspipe h1:nZHhxNLr7rhDRF2x66J4vWaO67xesufe6TSa5TJVRgo=
github.com/amnezia-vpn/amneziawg-go v0.2.4-udptlspipe/go.mod h1:1HzcMRtWO8UXot4W3kOdyA77Htrp4y7rxTaFNDIOtRM=
github.com/amnezia-vpn/amneziawg-go v0.2.5-udptlspipe h1:Si7JdC+aTcldbwSEBbjWDCG84ZfE/O63l2QXoSWyKHU=
github.com/amnezia-vpn/amneziawg-go v0.2.5-udptlspipe/go.mod h1:1HzcMRtWO8UXot4W3kOdyA77Htrp4y7rxTaFNDIOtRM=
github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI=
github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.3.2 h1:zlnbNHxumkRvfPWgfXu8RBwyNR1x8wh9cf5PTOCqs9Q=
github.com/gobwas/ws v1.3.2/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
github.com/amnezia-vpn/amneziawg-go v0.2.11 h1:JNGsxX4NIaYC/PpbUdwk23534HgS2SRMPgru6/K+364=
github.com/amnezia-vpn/amneziawg-go v0.2.11/go.mod h1:d7WpNfzCRLy7ufGElJBYpD58WRmNjyLyt3IDHPY8AmM=
github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4=
github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4=
github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
github.com/leninalive/udptlspipe v0.0.0-20240313123600-80348db0072f h1:VR2M22cXDtgp78N1mkCmxiXj1zYIP9ScUXS8gMHi6Vs=
github.com/leninalive/udptlspipe v0.0.0-20240313123600-80348db0072f/go.mod h1:U3O6PfEGIxmmxAkOucn8Ty1akGF/1N1lDPeHPLCz3Cg=
github.com/quic-go/quic-go v0.40.1 h1:X3AGzUNFs0jVuO3esAGnTfvdgvL4fq655WaOi1snv1Q=
github.com/quic-go/quic-go v0.40.1/go.mod h1:PeN7kuVJ4xZbxSv/4OX6S1USOX8MJvydwpTx31vx60c=
github.com/refraction-networking/utls v1.6.2 h1:iTeeGY0o6nMNcGyirxkD5bFIsVctP5InGZ3E0HrzS7k=
github.com/refraction-networking/utls v1.6.2/go.mod h1:yil9+7qSl+gBwJqztoQseO6Pr3h62pQoY1lXiNR/FPs=
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
github.com/tevino/abool/v2 v2.1.0 h1:7w+Vf9f/5gmKT4m4qkayb33/92M+Um45F2BkHOR+L/c=
github.com/tevino/abool/v2 v2.1.0/go.mod h1:+Lmlqk6bHDWHqN1cbxqhwEAwMPXgc8I1SDEamtseuXY=
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44=
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 h1:B82qJJgjvYKsXS9jeunTOisW56dUokqW/FOteYJJ/yg=
@@ -7,11 +7,13 @@ package org.amnezia.awg.fragment
import android.content.pm.PackageManager
import android.graphics.drawable.GradientDrawable
import android.os.Bundle
import android.text.method.LinkMovementMethod
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.ViewTreeObserver
import android.widget.FrameLayout
import android.widget.TextView
import androidx.core.os.bundleOf
import androidx.fragment.app.setFragmentResult
import com.google.android.material.bottomsheet.BottomSheetBehavior
@@ -42,6 +44,7 @@ class AddTunnelsSheet : BottomSheetDialogFragment() {
qrcode.isEnabled = false
qrcode.visibility = View.GONE
}
view.findViewById<TextView>(R.id.disclaimer)?.let { it.movementMethod = LinkMovementMethod.getInstance() }
return view
}
@@ -63,16 +63,53 @@
android:layout_marginEnd="@dimen/normal_margin"
android:layout_marginRight="@dimen/normal_margin"
android:nextFocusUp="@id/create_from_qrcode"
android:nextFocusDown="@id/disclaimer"
android:nextFocusForward="@id/disclaimer"
android:text="@string/create_empty"
android:textAlignment="viewStart"
android:textColor="?attr/colorOnSurface"
app:icon="@drawable/ic_action_edit"
app:iconPadding="@dimen/bottom_sheet_icon_padding"
app:iconTint="?attr/colorSecondary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="@+id/delimiter"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/create_from_qrcode"
app:rippleColor="?attr/colorSecondary" />
<View
android:id="@+id/delimiter"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="@dimen/medium_margin"
android:layout_marginLeft="@dimen/medium_margin"
android:layout_marginEnd="@dimen/medium_margin"
android:layout_marginRight="@dimen/medium_margin"
android:layout_marginBottom="14dp"
android:background="?attr/colorSecondary"
app:layout_constraintBottom_toBottomOf="@+id/disclaimer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/create_empty" />
<TextView
android:id="@+id/disclaimer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/medium_margin"
android:layout_marginLeft="@dimen/medium_margin"
android:layout_marginEnd="@dimen/medium_margin"
android:layout_marginRight="@dimen/medium_margin"
android:nextFocusUp="@id/create_empty"
android:text="@string/import_disclaimer"
android:linksClickable="true"
android:focusable="true"
android:textAppearance="?attr/textAppearanceBodySmall"
android:textColor="?android:attr/textColorSecondary"
android:textColorLink="?android:attr/textColorLink"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/delimiter" />
</androidx.constraintlayout.widget.ConstraintLayout>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 30 KiB

+1
View File
@@ -269,4 +269,5 @@
<string name="biometric_prompt_private_key_title">Аутентификация для просмотра приватного ключа</string>
<string name="biometric_auth_error">Ошибка аутентификации</string>
<string name="biometric_auth_error_reason">Ошибка аутентификации: %s</string>
<string name="import_disclaimer">Убедитесь, что вы получили файл конфигурации в надёжном источнике.\n\nОфициальные сервисы Amnezia доступны только на сайте <a href="https://storage.googleapis.com/amnezia/amnezia.org">amnezia.org</a>\n</string>
</resources>
+1
View File
@@ -3,6 +3,7 @@
<dimen name="fab_margin">16dp</dimen>
<dimen name="bottom_sheet_item_height">56dp</dimen>
<dimen name="normal_margin">8dp</dimen>
<dimen name="medium_margin">24dp</dimen>
<dimen name="bottom_sheet_top_padding">8dp</dimen>
<dimen name="bottom_sheet_icon_padding">16dp</dimen>
<dimen name="tunnel_list_placeholder_margin">16dp</dimen>
+3 -2
View File
@@ -167,8 +167,8 @@
<string name="response_packet_junk_size">Response packet junk size</string>
<string name="init_packet_magic_header">Init packet magic header</string>
<string name="response_packet_magic_header">Response packet magic header</string>
<string name="underload_packet_magic_header">Transport packet magic header</string>
<string name="transport_packet_magic_header">Underload packet magic header</string>
<string name="underload_packet_magic_header">Underload packet magic header</string>
<string name="transport_packet_magic_header">Transport packet magic header</string>
<string name="multiple_tunnels_summary_off">Turning on one tunnel will turn off others</string>
<string name="multiple_tunnels_summary_on">Multiple tunnels may be turned on simultaneously</string>
<string name="multiple_tunnels_title">Allow multiple simultaneous tunnels</string>
@@ -253,4 +253,5 @@
<string name="biometric_prompt_private_key_title">Authenticate to view private key</string>
<string name="biometric_auth_error">Authentication failure</string>
<string name="biometric_auth_error_reason">Authentication failure: %s</string>
<string name="import_disclaimer">Ensure that you obtained the configuration file from a trusted source.\n\nOfficial Amnezia services are available only at <a href="https://amnezia.org">amnezia.org</a>\n</string>
</resources>