1import{d as c,u as h,a as _,C as k,c as m,b as g,i as w,l as u,B as f,v as $,j as e,t,s as i,G as v,h as b,_ as y}from"./Df0YFKD7.js";import{u as P}from"./CMnD89re.js";const N={class:"help-page-container"},I={class:"help-article"},A={class:"help-callout"},D={class:"help-note"},q={class:"help-note-body"},E={class:"help-step"},T={class:"help-step-h2"},W={class:"help-ul"},C={class:"help-p"},R={class:"help-step"},G={class:"help-step-h2"},O={class:"help-code"},B={class:"help-p"},F={class:"help-step"},S={class:"help-step-h2"},U={class:"help-p"},K={class:"help-p"},V={class:"help-step"},L={class:"help-step-h2"},z={class:"help-code"},H={class:"help-step"},j={class:"help-step-h2"},M={class:"help-step"},Y={class:"help-step-h2"},J={class:"help-note"},Q={class:"help-note-body"},X={class:"help-step"},Z={class:"help-step-h2"},x={class:"help-p"},ee={class:"help-ol"},se={class:"help-p"},te={class:"help-code"},oe={class:"help-p"},ie={class:"help-step"},ne={class:"help-step-h2"},ae={class:"help-code"},le={class:"help-p"},re={class:"help-step"},de={class:"help-step-h2"},pe={class:"help-p"},ce={class:"help-code"},he={class:"help-p"},_e={class:"help-code"},ke={class:"help-step"},me={class:"help-step-h2"},ge={class:"help-ul"},we=c({__name:"mikrotik-awg",setup(ue){const{t:n,locale:l}=h(),a=_(),r=k(),d=m(()=>{const s=r.query.from;return typeof s=="string"&&s.length>0?{path:a(`/manage/${encodeURIComponent(s)}`),hash:"#wg"}:a("/dashboard")});return g(()=>({title:n("mikrotik_awg.meta_title"),meta:[{name:"robots",content:"noindex, nofollow"}]})),P(()=>({title:n("mikrotik_awg.title"),subtitle:n("mikrotik_awg.subtitle"),eyebrow:l.value==="ru"?"ÐомоÑÑ":"Help"})),(s,o)=>{const p=v;return b(),w("div",N,[u(p,{to:$(d),class:"help-back-link"},{default:f(()=>[o[0]||(o[0]=e("i",{class:"fas fa-arrow-left me-2"},null,-1)),i(" "+t(s.$t("mikrotik_awg.back")),1)]),_:1},8,["to"]),e("article",I,[e("div",A,[o[1]||(o[1]=e("i",{class:"fas fa-circle-info"},null,-1)),e("p",null,[e("strong",null,t(s.$t("mikrotik_awg.req_strong")),1),i(" "+t(s.$t("mikrotik_awg.req_text")),1)])]),e("div",D,[o[2]||(o[2]=e("i",{class:"fas fa-triangle-exclamation"},null,-1)),e("div",q,[e("strong",null,t(s.$t("mikrotik_awg.warn_h")),1),i(" "+t(s.$t("mikrotik_awg.warn_text")),1)])]),e("section",E,[e("h2",T,t(s.$t("mikrotik_awg.reqs_h")),1),e("ul",W,[e("li",null,t(s.$t("mikrotik_awg.reqs_1")),1),e("li",null,t(s.$t("mikrotik_awg.reqs_2")),1),e("li",null,t(s.$t("mikrotik_awg.reqs_3")),1),e("li",null,t(s.$t("mikrotik_awg.reqs_4")),1)]),e("p",C,t(s.$t("mikrotik_awg.reqs_check")),1),o[3]||(o[3]=e("pre",{class:"help-code"},[e("code",null,`/system/resource/print 2/system/package/print 3/system/device-mode/print`)],-1))]),e("section",R,[e("h2",G,t(s.$t("mikrotik_awg.model_h")),1),e("pre",O,[e("code",null,t(s.$t("mikrotik_awg.model_chain")),1)]),e("p",B,t(s.$t("mikrotik_awg.model_text")),1)]),e("section",F,[e("h2",S,t(s.$t("mikrotik_awg.s1_h")),1),e("p",U,t(s.$t("mikrotik_awg.s1_text")),1),o[4]||(o[4]=e("pre",{class:"help-code"},[e("code",null,"/ip firewall filter disable [find action=fasttrack-connection]")],-1)),e("p",K,t(s.$t("mikrotik_awg.s1_text2")),1),o[5]||(o[5]=e("pre",{class:"help-code"},[e("code",null,"/interface list member print where list=WAN")],-1))]),e("section",V,[e("h2",L,t(s.$t("mikrotik_awg.s2_h")),1),e("pre",z,[e("code",null,`/routing table add disabled=no fib name=r_to_vpn 4 5# `+t(s.$t("mikrotik_awg.s2_c1"))+` 6/ip firewall address-list add address=8.8.4.4 list=to_vpn 7 8# `+t(s.$t("mikrotik_awg.s2_c2"))+` 9/ip firewall address-list add address=10.0.0.0/8 list=RFC1918 10/ip firewall address-list add address=172.16.0.0/12 list=RFC1918 11/ip firewall address-list add address=192.168.0.0/16 list=RFC1918`,1)])]),e("section",H,[e("h2",j,t(s.$t("mikrotik_awg.s3_h")),1),o[6]||(o[6]=e("pre",{class:"help-code"},[e("code",null,`/ip firewall mangle add action=accept chain=prerouting dst-address-list=RFC1918 in-interface-list=!WAN comment="AWG: keep local" 12/ip firewall mangle add action=mark-connection chain=prerouting connection-mark=no-mark dst-address-list=to_vpn in-interface-list=!WAN new-connection-mark=to-vpn-conn passthrough=yes comment="AWG: mark conn" 13/ip firewall mangle add action=mark-routing chain=prerouting connection-mark=to-vpn-conn in-interface-list=!WAN new-routing-mark=r_to_vpn passthrough=yes comment="AWG: mark route"`)],-1))]),e("section",M,[e("h2",Y,t(s.$t("mikrotik_awg.s4_h")),1
13),o[8]||(o[8]=e("pre",{class:"help-code"},[e("code",null,`/interface veth add address=172.18.20.2/30 gateway=172.18.20.1 gateway6="" name=docker-awg-veth 14/ip address add interface=docker-awg-veth address=172.18.20.1/30 15 16/ip firewall mangle add action=change-mss chain=forward new-mss=1360 out-interface=docker-awg-veth passthrough=yes protocol=tcp tcp-flags=syn tcp-mss=1420-65535 comment="AWG: mss" 17 18/ip route add distance=1 dst-address=0.0.0.0/0 gateway=172.18.20.2 routing-table=r_to_vpn 19 20/ip firewall nat add action=masquerade chain=srcnat out-interface=docker-awg-veth comment="AWG: masq"`)],-1)),e("div",J,[o[7]||(o[7]=e("i",{class:"fas fa-triangle-exclamation"},null,-1)),e("div",Q,t(s.$t("mikrotik_awg.s4_note")),1)])]),e("section",X,[e("h2",Z,t(s.$t("mikrotik_awg.s5_h")),1),e("p",x,t(s.$t("mikrotik_awg.s5_text")),1),e("ol",ee,[e("li",null,[i(t(s.$t("mikrotik_awg.s5_1"))+" ",1),o[9]||(o[9]=e("pre",{class:"help-code"},[e("code",null,`PreUp = ip route add <ENDPOINT_IP>/32 via 172.18.20.1 dev docker-awg-veth 21PostDown = ip route del <ENDPOINT_IP>/32 via 172.18.20.1 dev docker-awg-veth`)],-1))]),e("li",null,[i(t(s.$t("mikrotik_awg.s5_2"))+" ",1),o[10]||(o[10]=e("pre",{class:"help-code"},[e("code",null,"AllowedIPs = 0.0.0.0/1, 128.0.0.0/1")],-1))])]),e("p",se,t(s.$t("mikrotik_awg.s5_template")),1),e("pre",te,[e("code",null,`[Interface] 22PrivateKey = <`+t(s.$t("mikrotik_awg.ph_key"))+`> 23Address = <`+t(s.$t("mikrotik_awg.ph_addr"))+`>/32 24MTU = 1420 25DNS = <DNS> 26# `+t(s.$t("mikrotik_awg.s5_obf"))+` 27PreUp = ip route add <ENDPOINT_IP>/32 via 172.18.20.1 dev docker-awg-veth 28PostDown = ip route del <ENDPOINT_IP>/32 via 172.18.20.1 dev docker-awg-veth 29 30[Peer] 31PublicKey = <SERVER_PUBLIC_KEY> 32AllowedIPs = 0.0.0.0/1, 128.0.0.0/1 33Endpoint = <ENDPOINT_IP>:<PORT> 34PersistentKeepalive = 25`,1)]),e("p",oe,t(s.$t("mikrotik_awg.s5_upload")),1)]),e("section",ie,[e("h2",ne,t(s.$t("mikrotik_awg.s6_h")),1),e("pre",ae,[e("code",null,"/file add type=directory name=usb/docker/awg-conf ;# "+t(s.$t("mikrotik_awg.s6_c1"))+` 35/container mounts add dst=/etc/amnezia/amneziawg list=awg_conf src=usb/docker/awg-conf 36 37/container add remote-image=catesin/awg-mikrotik-arm64:latest hostname=awg \\ 38 interface=docker-awg-veth mountlists=awg_conf \\ 39 root-dir=usb/docker/awg-root logging=yes start-on-boot=yes`,1)]),e("p",le,t(s.$t("mikrotik_awg.s6_text")),1),o[11]||(o[11]=e("pre",{class:"help-code"},[e("code",null,`/container start [find where root-dir~"awg-root"] 40/log print where topics~"container"`)],-1))]),e("section",re,[e("h2",de,t(s.$t("mikrotik_awg.s7_h")),1),e("p",pe,t(s.$t("mikrotik_awg.s7_inside")),1),o[12]||(o[12]=e("pre",{class:"help-code"},[e("code",null,'/container/shell [find where root-dir~"awg-root"]')],-1)),e("pre",ce,[e("code",null,"awg show # "+t(s.$t("mikrotik_awg.s7_c1"))+` 41traceroute -n 8.8.4.4 # `+t(s.$t("mikrotik_awg.s7_c2")),1)]),e("p",he,t(s.$t("mikrotik_awg.s7_lan")),1),e("pre",_e,[e("code",null,"curl -sS --max-time 8 --resolve ifconfig.co:443:<"+t(s.$t("mikrotik_awg.ph_ip"))+`> https://ifconfig.co 42# `+t(s.$t("mikrotik_awg.s7_c3")),1)])]),e("section",ke,[e("h2",me,t(s.$t("mikrotik_awg.notes_h")),1),e("ul",ge,[e("li",null,t(s.$t("mikrotik_awg.note_1")),1),e("li",null,[i(t(s.$t("mikrotik_awg.note_2"))+" ",1),o[13]||(o[13]=e("code",null,"/ip dns static type=FWD address-list=... match-subdomain=yes",-1))]),e("li",null,t(s.$t("mikrotik_awg.note_3")),1),e("li",null,t(s.$t("mikrotik_awg.note_4")),1),e("li",null,[i(t(s.$t("mikrotik_awg.note_5"))+" ",1),o[14]||(o[14]=e("code",null,"/container config set registry-url=",-1))])])])])])}}}),ve=y(we,[["__scopeId","data-v-5f3ba823"]]);export{ve as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.